pressly / sup

Super simple deployment tool - think of it like 'make' for a network of servers
https://pressly.github.io/sup
MIT License
2.48k stars 176 forks source link

Get remote execution command status #155

Closed kashp closed 5 years ago

kashp commented 5 years ago

How can we get the exit status of remote command along with stdout and stderr.

VojtechVitek commented 5 years ago

You can print the status in the bash command

echo "success"
echo $?

The sup is only concerned about the status of the full terminal session. Any non-zero status will be shown as an error.

A good practice is to enable strict mode, where the terminal exits on any error:

set -e

Does this help?

kashp commented 5 years ago

Thanks for the reply, That make sense i will try to parse logs in sup.