If rsync fails in deploy setup, raise an error
Currently, rsync
from demo.gramener.com has a || true
at the end of the line.
This is to prevent errors in case demo.gramener.com:/deploy/<dir>
does not exist.
But if the rsync fails for other reasons (e.g. SSH key failure), this SHOULD raise an error.
So if the exit code returned by rsync (in $?
is 23
), don't raise an error. Otherwise, raise an error reference