Skip to content

Commit 790723b

Browse files
Look yarnpkg in $PATH other than yarn (rails#42253)
This is defined as an issue in rails#37558; however, we take advantage of Debian `yarnpkg` package. With that, `yarnpkg` users from Debian can use `bin/yarn` and `yarn` package provided from Yarn community will not be affected because `yarn` is executed first.
1 parent af87199 commit 790723b

File tree

1 file changed

+1
-1
lines changed
  • railties/lib/rails/generators/rails/app/templates/bin

1 file changed

+1
-1
lines changed

railties/lib/rails/generators/rails/app/templates/bin/yarn.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ APP_ROOT = File.expand_path("..", __dir__)
22
Dir.chdir(APP_ROOT) do
33
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
44
select { |dir| File.expand_path(dir) != __dir__ }.
5-
product(["yarn", "yarn.cmd", "yarn.ps1"]).
5+
product(["yarn", "yarnpkg", "yarn.cmd", "yarn.ps1"]).
66
map { |dir, file| File.expand_path(file, dir) }.
77
find { |file| File.executable?(file) }
88

0 commit comments

Comments
 (0)