summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Chisamore <schisamo@getchef.com>2014-06-11 01:13:54 -0500
committerSeth Chisamore <schisamo@getchef.com>2014-06-11 01:13:54 -0500
commit3ccc955c392727c57ffd21f44cdbcfd94100729d (patch)
tree1f6fc1899cbbae482ed3757f23771183bbfcfdc7
parente0be5c519b1aa4979814eff8918748e4c5ce0881 (diff)
downloadohai-schisamo/ci-user-not-always-set.tar.gz
$USER is not always set :( in Jenkin’s processesschisamo/ci-user-not-always-set
-rwxr-xr-xci/jenkins_run_tests.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/jenkins_run_tests.sh b/ci/jenkins_run_tests.sh
index 17e565f2..78e8c7a4 100755
--- a/ci/jenkins_run_tests.sh
+++ b/ci/jenkins_run_tests.sh
@@ -9,7 +9,7 @@ bundle install --binstubs --without docgen --path vendor/bundle || ( rm Gemfile.
# preserve the environment and $PATH of the `jenkins` user
sudo -E bash -c "export PATH=$PATH && bin/rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec"
# Ensure Jenkins can clean this file up
-sudo chown $USER test.xml
+sudo chown ${USER-`whoami`} test.xml
RSPEC_RETURNCODE=$?