From 7cbcd41b6b4a56e897f8346b2fd57c257375bbb8 Mon Sep 17 00:00:00 2001 From: schneems Date: Thu, 2 Apr 2020 11:17:35 -0500 Subject: [PATCH] Fix yarn relative path in PATH --- CHANGELOG.md | 5 ++++- lib/language_pack/ruby.rb | 2 +- lib/language_pack/version.rb | 2 +- spec/hatchet/rails5_spec.rb | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 488ed6d66..7611d4322 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,13 @@ ## Master (unreleased) +## v214 (4/2/2020) + * Default Ruby version is now 2.6.6 (https://github.com/heroku/heroku-buildpack-ruby/pull/974) +* Fix regression. PATH value for `yarn` at runtime was relative instead of absolute (https://github.com/heroku/heroku-buildpack-ruby/pull/975) ## v213 (4/1/2020) -* Fix regression. PATH value at runtime was relative instead of absolute (https://github.com/heroku/heroku-buildpack-ruby/pull/973) +* Fix regression. PATH value for `ruby` at runtime was relative instead of absolute (https://github.com/heroku/heroku-buildpack-ruby/pull/973) ## v212 (3/26/2020) diff --git a/lib/language_pack/ruby.rb b/lib/language_pack/ruby.rb index 8a8506fc0..8335cb4dd 100644 --- a/lib/language_pack/ruby.rb +++ b/lib/language_pack/ruby.rb @@ -431,7 +431,7 @@ def setup_profiled(ruby_layer_path = "$HOME", gem_layer_path = "$HOME") instrument 'setup_profiled' do profiled_path = ["$HOME/bin"] profiled_path << binstubs_relative_paths(gem_layer_path) - profiled_path << "vendor/#{@yarn_installer.binary_path}" if has_yarn_binary? + profiled_path << "$HOME/vendor/#{@yarn_installer.binary_path}" if has_yarn_binary? profiled_path << "$PATH" set_env_default "LANG", "en_US.UTF-8" diff --git a/lib/language_pack/version.rb b/lib/language_pack/version.rb index 69e15f316..f16cf5fc5 100644 --- a/lib/language_pack/version.rb +++ b/lib/language_pack/version.rb @@ -2,6 +2,6 @@ module LanguagePack class LanguagePack::Base - BUILDPACK_VERSION = "v213" + BUILDPACK_VERSION = "v214" end end diff --git a/spec/hatchet/rails5_spec.rb b/spec/hatchet/rails5_spec.rb index 1ef1838e4..529f90812 100644 --- a/spec/hatchet/rails5_spec.rb +++ b/spec/hatchet/rails5_spec.rb @@ -69,7 +69,9 @@ def worker_task_for_app(app) Hatchet::Runner.new("rails51_webpacker").deploy do |app, heroku| expect(app.output).to include("Installing yarn") expect(app.output).to include("yarn install") - expect(app.run("rails -v")).to match("") + + expect(app.run("which -a node")).to match("/app/bin/node") + expect(app.run("which -a yarn")).to match("/app/vendor/yarn-") end end end