mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Look yarnpkg in $PATH other than yarn (#42253)
This is defined as an issue in #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.
This commit is contained in:
parent
af87199a80
commit
790723b92f
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ APP_ROOT = File.expand_path("..", __dir__)
|
|||
Dir.chdir(APP_ROOT) do
|
||||
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
|
||||
select { |dir| File.expand_path(dir) != __dir__ }.
|
||||
product(["yarn", "yarn.cmd", "yarn.ps1"]).
|
||||
product(["yarn", "yarnpkg", "yarn.cmd", "yarn.ps1"]).
|
||||
map { |dir, file| File.expand_path(file, dir) }.
|
||||
find { |file| File.executable?(file) }
|
||||
|
||||
|
|
Loading…
Reference in a new issue