This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
tmux + ssh + fish breaks. $SHELL gets evaluated locally / escaping problems? #692
Labels
bug
Something isn't working
What did you expect to happen?
Executing my upgrades for other machines works, unless I start using them inside tmux.
Having them as a dry-run exposes (for example):
/usr/bin/ssh -t flexo env TOPGRADE_PREFIX=flexo $SHELL -lc topgrade
What actually happened?
The remote side gives back an error:
env: ‘/usr/local/bin/fish’: No such file or directory
But of course that cannot be exected like that: Although locally there is a
/usr/local/bin/fish
- no such thing exists remotely. The remote shell would be/usr/bin/fish
(and is set as a default anyway).So I guess $SHELL shouldnt be evaluated locally - so if I escape it manually (on the commandline) to be...
(pay attention to the single quotes around
$SHELL
)... it works.
Now another error occurs if we have the "yes" flag activated, as it tries to run, but fails being unable to parse the commandline correctly. Weird.
Again, if I escape the given commandline to:
(Before)
(After)
it works.
Additional details:
macOS, from here trying to connect to multiple linux hosts of different flavors. They all behave the same.
Manually downloaded and placed in /usr/local/bin (linux) or ~/bin/topgrade (macos)
Run
topgrade --dry-run
to see which commands Topgrade is running. If the command seems wrong and you know why pleaes tell us so.If the command seems fine try to run it yourself and tell us if you got a different result from Topgrade.
The text was updated successfully, but these errors were encountered: