Skip to content

Commit

Permalink
Fixed hook pipe exit
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 7, 2011
1 parent 16500e4 commit 55d63bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/deploy
Expand Up @@ -106,7 +106,7 @@ run() {
else
local shell="ssh $url"
fi
echo $shell $@ >> $LOG
echo $shell "\"$@\"" >> $LOG
$shell $@
}

Expand All @@ -133,10 +133,10 @@ hook() {
local cmd=`config_get $hook`
if test -n "$cmd"; then
log "executing $hook \`$cmd\`"
run "cd $path && $cmd 2>&1 | tee -a $LOG"
run "cd $path && $cmd 2>&1 | tee -a $LOG; exit \${PIPESTATUS[0]}"
test $? -eq 0 || abort "$hook hook failed"
else
log "hook $hook (not-found)"
log "hook $hook"
fi
}

Expand Down

0 comments on commit 55d63bf

Please sign in to comment.