Use shell to run command (so PATH is searched)

This commit is contained in:
Keith Winstein
2012-03-18 04:11:49 -04:00
parent cbeda2d2fe
commit f7aae74330
+2 -1
View File
@@ -178,7 +178,8 @@ if ( $pid == 0 ) { # child
}
if ( scalar @command > 0 ) {
push @server, ( '--', @command );
my $command_string = q{"} . (join ' ', @command) . q{"};
push @server, ( '--', '/bin/sh', '-c', $command_string );
}
exec 'ssh', '-S', 'none', '-o', "ProxyCommand=$0 --fake-proxy -- %h %p", '-t', $userhost, '--', @server;