windvalley/gossh

With the `-r` parameter in the `gossh script` command, the script execution is considered successful even if the script returns a non-zero exit code

Closed this issue · 0 comments

For example:

cat test.sh

#!/usr/bin/env bash

echo mock error

exit 1
$ gossh script node1.sre.im -e test.sh -uvagrant -r

The output is:

node1.sre.im | 2024-05-29 11:23:34.369629 | SUCCESS >>
mock error

[INFO] 2024-05-29 11:23:34.369776 success count: 1, failed count: 0, elapsed: 0.20s

But the output should be:

node1.sre.im | 2024-05-29 11:26:36.420079 | FAILED >>
mock error

[INFO] 2024-05-29 11:26:36.420124 success count: 0, failed count: 1, elapsed: 0.64s