I have a script that does the job (updates two files, sets execute rights and runs a shell script successfully), but still WinSCP returns error (code 1):
winscp.com /command "option batch continue" "option confirm off"
"open scp://user:email@example.com:22 -timeout=3600 -hostkey="*""
"put -speed=5 -resumesupport=on C:\tmp\update.tgz /tmp/update.tgz"
"put -speed=5 -resumesupport=on C:\tmp\deploy.sh /tmp/deploy.sh"
"chmod 755 /tmp/deploy.sh" "call /tmp/deploy.sh" "exit"
If I enable logging I can see that WinSCP tries to run e.g. groups command, which is not found in my target. The WinSCP SCP requirements (https://winscp.net/eng/docs/requirements#scp) state that WinSCP wants to run commands cd, chgrp, chmod, chown, echo, groups, ls, mkdir, mv, pwd, scp, rm, ln, unalias and unset. How do I make WinSCP to ignore the errors caused by the failure to run these commands?
Or can I make some kind of a workaround? Would I be able to get e.g. the return code of the script that I call with "call /tmp/deploy.sh"?