diff options
author | Ben Elliston <bje@gnu.org> | 2016-04-07 16:57:08 +1000 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2016-04-07 16:57:08 +1000 |
commit | a5fe563337dd18f64a9e291764d6ddf16d681578 (patch) | |
tree | f6066e30f713bd6a3bf2837b34bdb726c6c22e89 /lib | |
parent | 1de22bf567be9b0a1d9a2a9066f2f7e2f02563f4 (diff) |
* lib/remote.exp (remote_exec): Join cd $remotedir and $program on
the command line with ';' and not &&.
Diffstat (limited to 'lib')
-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] } |