-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Less exceptional user install #7100
Less exceptional user install #7100
Conversation
The main purpose is to put handling of user installation into the same place as e.g. handling the --build-root option handling. There is no reason why the --build-root option should not prefix also paths used for user installation. Please note that the `util_installer` in `test_generate_plugins_with_user_install` enforced the `:install_dir`, which is against what user install is about.
It is not nice to require install directory to be always specified, while this option is later ignored for user installed gems. Actually, the next step will be to remove `check_install_dir` check and let the install dir override the user install.
The combination of `install-dir` and `--user-install` used to be disabled for no good reason. This even makes problem on Linux distributions such as Fedora, where `--user-install` is set by default via operating_system.rb. The `--install-dir` is already prefered over the `--user-install` by the implementation, therefore just drop the check.
b581da1
to
313b1c5
Compare
The segfault during Bundler test case run is very likely unrelated to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, I think!
In principle this makes sense to me and I'm in favor of it. Looking at the code, I don't see any obvious issues. I'll poke at it locally later and see if everything seems good. |
@deivid-rodriguez if you think this is good to go, feel free to merge. I'm just looking at it from my phone atm, so couldn't try running it myself, is all. |
Funnily enough, I have discovered
This PR should also address this issue. |
@duckinator I just looked at this superficially, I'd appreciate if you have a closer look 👍. |
I can find no difference in behavior between 3.4.21 (latest release) and 313b1c5 (latest commit on this branch), excluding the intentional one ( |
Thanks for the PR, @voxik. This is quite a nice improvement. ^.^ |
This is an attempt to make the user install less exceptional. It does several things:
--install-dir
and--user-install
can't be specified at once on command line. This was not the case internally anyway. Now the--install-dir
simple overrides the--user-install
.--build-root
option is specified, it is applied to every possible path, including the user install case. I am not 100% convinced that this really is the right thing, OTOH it should not harm anything, because using--build-root
is very specific and use it together with--user-install
would be exceptionalThis is an attempt to address some concerns I have risen in #7083