Closed mnwdbase closed 11 months ago
sh.pushd
only changes the current working directory of your local commands. it doesn't influence sh.ssh
's remote cwd. advanced ssh usage is outside of the scope of provided support of this library.
iam only cd, is very simple command, cannot do it?
Do it on the command line first and you will see it doesn't work like you expect. Once you get it working on the commandline, then convert it to sh
@amoffat i can make ssh root@1.2.3.4 cd /remote/dir && npm run in commandline and works but with sh how can i make it?
You first need to learn how ssh runs command line arguments on a remote server, then it will become clear to you https://linux.die.net/man/1/ssh
In any case, this is not an sh issue.
i try:
ERROR: cannot find package.json in /root how can fix?