File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -556,7 +556,7 @@ pub async fn run_server(config: &AppConfig, state: AppState) -> anyhow::Result<(
556
556
{
557
557
server = server
558
558
. bind_uds ( unix_socket)
559
- . map_err ( |e| bind_unix_socket ( e, unix_socket) ) ?;
559
+ . map_err ( |e| bind_unix_socket_err ( e, unix_socket) ) ?;
560
560
}
561
561
#[ cfg( not( target_family = "unix" ) ) ]
562
562
anyhow:: bail!( "Unix sockets are not supported on your operating system. Use listen_on instead of unix_socket." ) ;
@@ -614,7 +614,8 @@ fn bind_error(e: std::io::Error, listen_on: std::net::SocketAddr) -> anyhow::Err
614
614
anyhow:: anyhow!( e) . context ( ctx)
615
615
}
616
616
617
- fn bind_unix_socket ( e : std:: io:: Error , unix_socket : & PathBuf ) -> anyhow:: Error {
617
+ #[ cfg( target_family = "unix" ) ]
618
+ fn bind_unix_socket_err ( e : std:: io:: Error , unix_socket : & PathBuf ) -> anyhow:: Error {
618
619
let ctx = if e. kind ( ) == std:: io:: ErrorKind :: PermissionDenied {
619
620
format ! (
620
621
"You do not have permission to bind to the UNIX socket {unix_socket:?}. \
You can’t perform that action at this time.
0 commit comments