@@ -82,7 +82,7 @@ impl WslRemoteConnection {
8282 this. can_exec = this. detect_can_exec ( shell) . await ?;
8383 this. platform = this. detect_platform ( shell) . await ?;
8484 this. remote_binary_path = Some (
85- this. ensure_server_binary ( & delegate, release_channel, version, commit, cx)
85+ this. ensure_server_binary ( & delegate, release_channel, version, commit, shell , cx)
8686 . await ?,
8787 ) ;
8888 log:: debug!( "Detected WSL environment: {this:#?}" ) ;
@@ -163,6 +163,7 @@ impl WslRemoteConnection {
163163 release_channel : ReleaseChannel ,
164164 version : SemanticVersion ,
165165 commit : Option < AppCommitSha > ,
166+ shell : ShellKind ,
166167 cx : & mut AsyncApp ,
167168 ) -> Result < Arc < RelPath > > {
168169 let version_str = match release_channel {
@@ -184,9 +185,13 @@ impl WslRemoteConnection {
184185 paths:: remote_wsl_server_dir_relative ( ) . join ( RelPath :: unix ( & binary_name) . unwrap ( ) ) ;
185186
186187 if let Some ( parent) = dst_path. parent ( ) {
187- self . run_wsl_command ( "mkdir" , & [ "-p" , & parent. display ( PathStyle :: Posix ) ] )
188- . await
189- . map_err ( |e| anyhow ! ( "Failed to create directory: {}" , e) ) ?;
188+ let parent = parent. display ( PathStyle :: Posix ) ;
189+ if shell == ShellKind :: Nushell {
190+ self . run_wsl_command ( "mkdir" , & [ & parent] ) . await
191+ } else {
192+ self . run_wsl_command ( "mkdir" , & [ "-p" , & parent] ) . await
193+ }
194+ . map_err ( |e| anyhow ! ( "Failed to create directory: {}" , e) ) ?;
190195 }
191196
192197 #[ cfg( debug_assertions) ]
0 commit comments