fix: ensure we call apps_create at all proper locations

This commit is contained in:
Jose Diaz-Gonzalez
2018-03-05 23:47:10 -05:00
parent cc0687ec0f
commit 40b0bdd6e8
3 changed files with 35 additions and 24 deletions

View File

@@ -1186,3 +1186,17 @@ release_app_deploy_lock() {
flock -u "$APP_DEPLOY_LOCK_FD" && rm -f "$APP_DEPLOY_LOCK_FILE" &> /dev/null
}
suppress_output() {
declare desc="suppress all output from a given command unless there is an error"
local TMP_COMMAND_OUTPUT
TMP_COMMAND_OUTPUT=$(mktemp "/tmp/${FUNCNAME[0]}.XXXX")
trap 'rm -rf "$TMP_COMMAND_OUTPUT" > /dev/null' RETURN INT TERM EXIT
"$@" > "$TMP_COMMAND_OUTPUT" 2>&1 || {
local exit_code="$?"
cat "$TMP_COMMAND_OUTPUT"
return "$exit_code"
}
return 0
}