Fix st2ctl reload so it preserves exit code from "st2-register-content"
script and correctly fails on failure by default.
@@ -208,7 +208,11 @@ case ${1} in
;;
reload)
register_content ${@:2}
+ exit_code=$?
getpids
+ # Note: We want to preserve st2-register-content "fail on failure" behavior
+ # and propagate the correct exit code and exit with non zero on failure
+ exit ${exit_code}
;;
clean)
must_be_root
