Skip to content

Commit

Permalink
Simplify run_script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahoney committed Jan 5, 2021
1 parent 4e1fb53 commit e5f1cf6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker-lifecycle-listener.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ docker_running() {

run_script() {
local script=$1
log "Running $(basename "$script")"
local script_name; script_name="$(basename "$script")"
log "Running $script_name"
if "$script"; then
log "Ran $(basename "$script")"
log "$script_name Succeeded"
else
log "$(basename "$script") Failed"
log "$script_name Failed"
fi
}

Expand Down

0 comments on commit e5f1cf6

Please sign in to comment.