2 APP_ROOT = File.expand_path("..", __dir__)
4 yarn = ENV["PATH"].split(File::PATH_SEPARATOR)
5 .reject { |dir| File.expand_path(dir) == __dir__ }
6 .product(["yarnpkg", "yarn", "yarn.cmd", "yarn.ps1"])
7 .map { |dir, file| File.expand_path(file, dir) }
8 .find { |file| File.executable?(file) }
11 exec yarn, "--ignore-engines", *ARGV
13 warn "Yarn executable was not detected in the system."
14 warn "Download Yarn at https://yarnpkg.com/en/docs/install"