diff options
author | Jeremiah Snapp <jeremiah@chef.io> | 2021-09-09 00:24:57 -0400 |
---|---|---|
committer | Jeremiah Snapp <jeremiah@chef.io> | 2021-09-09 00:24:57 -0400 |
commit | 1ba18c5a38b19f40b25dc6ff31b3adcee5f7ff16 (patch) | |
tree | a811e7ef1687cb016274f6777ba717a0f0e9cda4 | |
parent | c81c085f6f6d3fc058d71c8295d0b5620709198b (diff) | |
download | chef-jsnapp/use-sudo-set-home-option-in-omnibus-test.sh.tar.gz |
Use sudo's -H option in omnibus-test.shjsnapp/use-sudo-set-home-option-in-omnibus-test.sh
"sudo -H" is used for "bundle install" so ".bundle/cache"
is put in the root user's HOME instead of
the user running this script.
This helps avoid file permission related problems in subsequent runs of
"bundle install" that are not run with sudo.
Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
-rw-r--r-- | omnibus/omnibus-test.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh index 7e01cbe60b..7fb3e51932 100644 --- a/omnibus/omnibus-test.sh +++ b/omnibus/omnibus-test.sh @@ -122,5 +122,8 @@ fi export CHEF_LICENSE=accept-no-persist cd "$chef_gem" -sudo -E bundle install --jobs=3 --retry=3 +# -H is used for "bundle install" so ".bundle/cache" is put in the root user's HOME instead of +# the user running this script. This helps avoid file permission related problems in subsequent runs of +# "bundle install" that are not run with sudo. +sudo -E -H bundle install --jobs=3 --retry=3 sudo -E bundle exec rspec --profile -f progress |