script/hooks/commit-msg in penchant-0.2.12 vs script/hooks/commit-msg in penchant-0.2.13

- old
+ new

@@ -1,16 +1,27 @@ #!/bin/bash msg=$(cat $1) -OLD_GIT_DIR=$GIT_DIR +# wtf mac os x lion +if [ ! -z "$MY_RUBY_HOME" ]; then + PATH="$MY_RUBY_HOME/bin:$PATH" +fi -if [[ "${msg}" != *"[ci skip]"* ]]; then - if [ "$(penchant gemfile-env)" != "remote" ]; then - penchant gemfile remote - fi +if [ ! -z "$GEM_PATH" ]; then + oifs="$IFS" + while IFS=":" read -ra GEM_PATHS; do + FIXED_GEM_PATH="" + for i in "${GEM_PATHS[@]}"; do + FIXED_GEM_PATH="$FIXED_GEM_PATH:${i}/bin" + done + done <<< "$GEM_PATH" + IFS="$oifs" + PATH="$FIXED_GEM_PATH:$PATH" +fi - bundle exec rake +if [[ "${msg}" != *"[ci skip]"* ]]; then + bundle exec rake --trace R=$? if [ $R -ne 0 ]; then exit $R; fi fi