From 102e440e2b4908051e314f7d88730270bc89f1fd Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 12 Oct 2011 20:00:34 -0400 Subject: [PATCH] fix bad usage of 'su'. instead use 'set -e'. I had had tried to use -e argument to su, thinking that it would go through to sh, but it does not. instead, just use 'set -e' --- stack.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack.sh b/stack.sh index a4cbc2e..2d76875 100755 --- a/stack.sh +++ b/stack.sh @@ -69,9 +69,9 @@ if [[ $EUID -eq 0 ]]; then cp -r -f "$PWD" "$STACK_DIR" chown -R stack "$STACK_DIR" if [[ "$SHELL_AFTER_RUN" != "no" ]]; then - exec su -ec "cd $STACK_DIR; bash stack.sh; bash" stack + exec su -c "set -e; cd $STACK_DIR; bash stack.sh; bash" stack else - exec su -ec "cd $STACK_DIR; bash stack.sh" stack + exec su -c "set -e; cd $STACK_DIR; bash stack.sh" stack fi exit 1 fi