-
Notifications
You must be signed in to change notification settings - Fork 0
Add BUNDLE_GEMFILE-aware dual-boot support (rebased on v359) #4
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
base: sync_v359
Are you sure you want to change the base?
Changes from all commits
a034ccb
48f1020
d18d949
535bb1f
f8b404f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,10 +17,14 @@ | |
| begin | ||
| app_path = Pathname(ARGV[0]) | ||
| cache_path = Pathname(ARGV[1]) | ||
| gemfile_lock = LanguagePack.gemfile_lock(app_path: app_path) | ||
| Dir.chdir(app_path) | ||
|
|
||
| # Load user config vars from the env dir before we touch the Gemfile so that | ||
| # BUNDLE_GEMFILE (set as a Heroku config var) can steer which lockfile we | ||
| # read. Without this, gemfile_lock would always read Gemfile.lock regardless | ||
| # of the user's BUNDLE_GEMFILE setting. | ||
| LanguagePack::ShellHelpers.initialize_env(ARGV[2]) | ||
| gemfile_lock = LanguagePack.gemfile_lock(app_path: app_path) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heroku passes user config vars to buildpacks via a directory of files (one file per var), not as actual ENV entries. The path to that dir is ARGV[2] in ruby_compile.rb. Sequence before our fix: gemfile_lock = LanguagePack.gemfile_lock(...) # reads ENV["BUNDLE_GEMFILE"] → ""
Dir.chdir(app_path)
LanguagePack::ShellHelpers.initialize_env(...) # now user_env_hash["BUNDLE_GEMFILE"] = "Gemfile.next"
ENV["BUNDLE_GEMFILE"] # empty, Heroku doesn't set it in ENV
|| LanguagePack::ShellHelpers.user_env_hash[..] # empty too, initialize_env hasn't run yet
|| "Gemfile" # falls through to defaultSo it picked After moving the line below initialize_env, user_env_hash is populated first, gemfile_name resolves to |
||
| LanguagePack.call( | ||
| app_path: app_path, | ||
| cache_path: cache_path, | ||
|
|
||
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.
Stop it failing in our fork.