mattbaileyuk commented on code in PR #74:
URL: https://github.com/apache/couchdb-ci/pull/74#discussion_r1776930404


##########
bin/install-elixir.sh:
##########
@@ -70,5 +70,5 @@ rm elixir.zip
 # it may be called without a preceding configure call, for instance when
 # building packages from a dist tarball. So we ensure it has hex there already.
 echo "===> Installing Hex"
-MIX_HOME=/home/jenkins/.mix /usr/local/bin/mix local.hex --force
-chown -R jenkins:jenkins /home/jenkins
+MIX_HOME=${HOME}.mix /usr/local/bin/mix local.hex --force
+chown -R $(whoami):$(whoami) ${HOME}

Review Comment:
   In our case it was running as `root` rather than `jenkins` which is the 
cause of the problems (we don't even have a `jenkins` user when running this 
script, so `chown` fails). But with this change it's fine as I believe `whoami` 
does always return "root" when you're running as `root` (and even when running 
`sudo whoami` as any user)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to