Permalink
Browse files

post-receive: set bash in interactive mode; exit on errors

In interactive mode users' /etc/bash.bashrc (or /etc/bashrc, depending
on OS) and ~/.bashrc will be sourced, allowing rbenv and RVM
installations to be used without continual re-editing of deploy scripts.
'set -e' merely stops execution on failure of a sub-command.
  • Loading branch information...
1 parent 20a08b8 commit 0c0bd13ce49e336a7e7bc6d7f440b21752c99814 @blt blt committed with Jan 20, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/hooks/post-receive.sh
@@ -1,4 +1,6 @@
-#!/usr/bin/env bash
+#!/bin/bash -i
+set -e
+
if [ "$GIT_DIR" = "." ]; then
# The script has been called as a hook; chdir to the working copy
cd ..

0 comments on commit 0c0bd13

Please sign in to comment.