@@ -254,7 +254,7 @@ impl RemoteConnection for SshRemoteConnection {
254
254
255
255
let ssh_proxy_process = match self
256
256
. socket
257
- . ssh_command ( "sh" , & [ "-lc " , & start_proxy_command] )
257
+ . ssh_command ( "sh" , & [ "-c " , & start_proxy_command] )
258
258
// IMPORTANT: we kill this process when we drop the task that uses it.
259
259
. kill_on_drop ( true )
260
260
. spawn ( )
@@ -529,7 +529,7 @@ impl SshRemoteConnection {
529
529
. run_command (
530
530
"sh" ,
531
531
& [
532
- "-lc " ,
532
+ "-c " ,
533
533
& shell_script ! ( "mkdir -p {parent}" , parent = parent. to_string( ) . as_ref( ) ) ,
534
534
] ,
535
535
)
@@ -607,7 +607,7 @@ impl SshRemoteConnection {
607
607
. run_command (
608
608
"sh" ,
609
609
& [
610
- "-lc " ,
610
+ "-c " ,
611
611
& shell_script ! ( "mkdir -p {parent}" , parent = parent. to_string( ) . as_ref( ) ) ,
612
612
] ,
613
613
)
@@ -655,7 +655,7 @@ impl SshRemoteConnection {
655
655
dst_path = & dst_path. to_string( )
656
656
)
657
657
} ;
658
- self . socket . run_command ( "sh" , & [ "-lc " , & script] ) . await ?;
658
+ self . socket . run_command ( "sh" , & [ "-c " , & script] ) . await ?;
659
659
Ok ( ( ) )
660
660
}
661
661
@@ -797,7 +797,7 @@ impl SshSocket {
797
797
}
798
798
799
799
async fn platform ( & self ) -> Result < RemotePlatform > {
800
- let uname = self . run_command ( "sh" , & [ "-lc " , "uname -sm" ] ) . await ?;
800
+ let uname = self . run_command ( "sh" , & [ "-c " , "uname -sm" ] ) . await ?;
801
801
let Some ( ( os, arch) ) = uname. split_once ( " " ) else {
802
802
anyhow:: bail!( "unknown uname: {uname:?}" )
803
803
} ;
@@ -828,7 +828,7 @@ impl SshSocket {
828
828
}
829
829
830
830
async fn shell ( & self ) -> String {
831
- match self . run_command ( "sh" , & [ "-lc " , "echo $SHELL" ] ) . await {
831
+ match self . run_command ( "sh" , & [ "-c " , "echo $SHELL" ] ) . await {
832
832
Ok ( shell) => shell. trim ( ) . to_owned ( ) ,
833
833
Err ( e) => {
834
834
log:: error!( "Failed to get shell: {e}" ) ;
0 commit comments