Fix Bundler vendoring when a subdirectory is configured#5567
Merged
deivid-rodriguez merged 3 commits intomainfrom Aug 23, 2022
Merged
Fix Bundler vendoring when a subdirectory is configured#5567deivid-rodriguez merged 3 commits intomainfrom
deivid-rodriguez merged 3 commits intomainfrom
Conversation
jurre
approved these changes
Aug 22, 2022
Member
jurre
left a comment
There was a problem hiding this comment.
Thanks, that makes a lot of sense to me! Assuming CI passes, LGTM
Contributor
Author
|
Yeah, CI definitely needed since I only run specs manually for Bundler, yet I changed helpers in common, so let's see :) I also tested this on https://github.com/gewo/dependabot-bundler-vendor, and the dry-run scripts seem to behave fine now. I didn't create actual PRs, just tried the dry-run script. But I can do that before merging just to make sure. The only difference to real PRs should be that from my machine, dependabot will add an extra platform to the lockfile, it seems. Before$ bin/dry-run.rb bundler gewo/dependabot-bundler-vendor --clone ✅$ bin/dry-run.rb bundler gewo/dependabot-bundler-vendor --dir /acceptance --clone ❌After$ bin/dry-run.rb bundler gewo/dependabot-bundler-vendor --clone ✅$ bin/dry-run.rb bundler gewo/dependabot-bundler-vendor --dir /acceptance --clone ✅ |
5109642 to
c2ba91d
Compare
There was a `let` clause for potentially customizing the directory, but it was never being used.
Use `Bundler.settings.app_cache_path`, which is just a relative path to the cache folder, and prepend to that the configured directory.
c2ba91d to
49b7ccc
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The actual fix is 51096421a9db36fcfcdf06131058374037681f16, but I also included some spec changes to be able to test it.
Previously we were passing an absolute path hardcoded to the root of the target repository as the cache path. Now we pass a relative path, to which we prepend the configured subdirectory if any.
Fixes #3736.