diff options
Diffstat (limited to 'lib/remote.exp')
-rw-r--r-- | lib/remote.exp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/remote.exp b/lib/remote.exp index 2b9a4da..fea11cf 100644 --- a/lib/remote.exp +++ b/lib/remote.exp @@ -314,7 +314,11 @@ proc remote_exec { hostname program args } { } else { if { [board_info $hostname exists remotedir] } { set remotedir [board_info $hostname remotedir] - set program "test -d $remotedir && cd $remotedir && $program" + # This is a bit too clever. Join cd $remotedir and + # $program on the command line with ';' and not '&&'. When + # called, $program may be mkdir to initially create the + # remote directory, in which case cd would fail. + set program "test -d $remotedir && cd $remotedir; $program" } set result [call_remote "" exec $hostname $program $pargs $inp $outp] } |