put yarn binary in quotes to allow spaces in path to it

This commit is contained in:
Markus Doits 2020-12-10 18:13:02 +01:00
parent 46337faa79
commit f4265aebc8
No known key found for this signature in database
GPG Key ID: 7D8D679F5AF2A284

@ -10,13 +10,13 @@ namespace :yarn do
end
yarn_flags =
if `#{Rails.root}/bin/yarn --version`.start_with?("1")
if `"#{Rails.root}/bin/yarn" --version`.start_with?("1")
"--no-progress --frozen-lockfile"
else
"--immutable"
end
system({ "NODE_ENV" => node_env }, "#{Rails.root}/bin/yarn install #{yarn_flags}")
system({ "NODE_ENV" => node_env }, "\"#{Rails.root}/bin/yarn\" install #{yarn_flags}")
end
end