summaryrefslogtreecommitdiff
path: root/lib/bundler/installer/parallel_installer.rb
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2018-06-12 11:07:55 +0000
committerThe Bundler Bot <bot@bundler.io>2018-06-12 11:07:55 +0000
commit31b53cf987f5e737e1cddc70881d55b0eec8c38f (patch)
treed9f5935bb2f7a4a0ad0e892ebdc9b4962d444cbc /lib/bundler/installer/parallel_installer.rb
parent63f0561d8391271c4a9b0551037c4a16686c5c4e (diff)
parentfb40210e0642547e6b7802f934a42cb207eba165 (diff)
downloadbundler-31b53cf987f5e737e1cddc70881d55b0eec8c38f.tar.gz
Auto merge of #6550 - brodock:6546-fix-home-permissions, r=colby-swandale
Don't fallback to tempdir when required directories exist. ### What was the end-user problem that led to this PR? When running Omnibus packaged software with updated bundler, a warning is displayed because the home folder is not owned by the user: ``` `/var/opt/gitlab` is not writable. Bundler will use `/tmp/bundler/home/root' as your home directory temporarily. ``` There are valid reasons why this is desired, and I don't have control over it. What I can do is create the required folders used by bundler and provide them with the right permissions. See https://github.com/bundler/bundler/issues/6546 ### What was your diagnosis of the problem? In practice instead of asking for permission on a higher level, if required folders are present and they have the right permissions, we shouldn't fallback to warning + temp directory, we should just use what is provided. ### What is your fix for the problem, implemented in this PR? When home directory is not writable, but the required .gem and .bundle are, we should use them instead of falling back to use tempdirs. This creates a workaround for more restrictive setups using Omnibus Docker or any hardened setup, to overcome the annoyances introduced by #4951. ### Why did you choose this fix out of the possible options? This allows for distributions, package maintainers, etc to provide an alternative while keeping their hardenings requirements. When provided the required folders with the required ownership/permission, we should not bother by not having any write permissions on the `$HOME` directory.
Diffstat (limited to 'lib/bundler/installer/parallel_installer.rb')
0 files changed, 0 insertions, 0 deletions