Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet another way of removing exit status #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions gojira.sh
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ function p_compose {

local tmps=()

trap "cleanup" EXIT

for egg in "${GOJIRA_EGGS[@]}"; do
# Have not found an alternative to this that does not involve a potential
# dangerous eval
Expand Down Expand Up @@ -989,7 +991,6 @@ main() {
local cmd="sh -l -i"
[[ $GOJIRA_TARGET =~ kong(-[cd]p)? ]] && cmd="gosh -l -i"
run_command "$GOJIRA_TARGET" "$GOJIRA_CLUSTER_INDEX" "$cmd"
exit_status=$?
;;
build)
build
Expand All @@ -1001,7 +1002,6 @@ main() {
;;
run)
run_command $GOJIRA_TARGET $GOJIRA_CLUSTER_INDEX
exit_status=$?
;;
images)
docker images --filter=reference='gojira*' $EXTRA_ARGS
Expand Down Expand Up @@ -1103,5 +1103,3 @@ pushd() { builtin pushd $1 > /dev/null; }
popd() { builtin popd > /dev/null; }

main "$@"
cleanup # make sure we clean up
exit $exit_status