summaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main/assembly/bin/macosx-universal-32/sonar.sh
diff options
context:
space:
mode:
authorCarlos Sanchez <csanchez@maestrodev.com>2011-09-27 16:16:15 +0200
committerCarlos Sanchez <csanchez@maestrodev.com>2011-09-27 16:16:15 +0200
commita3e7c015f7a001db50d960202ee11ec838ca5113 (patch)
treef6ec8997262e2eb035a89704ef0b9e145e11a34e /sonar-application/src/main/assembly/bin/macosx-universal-32/sonar.sh
parent24b35ccec51c57c47b301893e46c96c92cfdfe6d (diff)
downloadsonarqube-a3e7c015f7a001db50d960202ee11ec838ca5113.tar.gz
sonarqube-a3e7c015f7a001db50d960202ee11ec838ca5113.zip
Exit code is not properly returned when using RUN_AS_USER (from http://jira.codehaus.org/browse/MAPPASM-113 )
Diffstat (limited to 'sonar-application/src/main/assembly/bin/macosx-universal-32/sonar.sh')
-rwxr-xr-xsonar-application/src/main/assembly/bin/macosx-universal-32/sonar.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-application/src/main/assembly/bin/macosx-universal-32/sonar.sh b/sonar-application/src/main/assembly/bin/macosx-universal-32/sonar.sh
index 6ad48536cc5..525cf6053ee 100755
--- a/sonar-application/src/main/assembly/bin/macosx-universal-32/sonar.sh
+++ b/sonar-application/src/main/assembly/bin/macosx-universal-32/sonar.sh
@@ -334,6 +334,7 @@ checkUser() {
# Still want to change users, recurse. This means that the user will only be
# prompted for a password once. Variables shifted by 1
su -m $RUN_AS_USER -c "\"$REALPATH\" $2"
+ RETVAL=$?
# Now that we are the original user again, we may need to clean up the lock file.
if [ "X$LOCKPROP" != "X" ]
@@ -349,7 +350,7 @@ checkUser() {
fi
fi
- exit 0
+ exit $RETVAL
fi
}