2019-03-15 23:05:39 +05:30
|
|
|
Yarn executable in debian is yarnpkg
|
|
|
|
|
|
|
|
--- a/lib/tasks/yarn.rake
|
|
|
|
+++ b/lib/tasks/yarn.rake
|
2020-03-12 18:50:15 +05:30
|
|
|
@@ -3,7 +3,7 @@
|
2019-03-15 23:05:39 +05:30
|
|
|
namespace :yarn do
|
|
|
|
desc 'Ensure Yarn is installed'
|
|
|
|
task :available do
|
|
|
|
- unless system('yarn --version', out: File::NULL)
|
|
|
|
+ unless system('yarnpkg --version', out: File::NULL)
|
|
|
|
warn(
|
|
|
|
'Error: Yarn executable was not detected in the system.'.color(:red),
|
|
|
|
'Download Yarn at https://yarnpkg.com/en/docs/install'.color(:green)
|
2020-03-12 18:50:15 +05:30
|
|
|
@@ -14,10 +14,10 @@
|
2019-03-15 23:05:39 +05:30
|
|
|
|
|
|
|
desc 'Ensure Node dependencies are installed'
|
|
|
|
task check: ['yarn:available'] do
|
|
|
|
- unless system('yarn check --ignore-engines', out: File::NULL)
|
|
|
|
+ unless system('yarnpkg check --ignore-engines', out: File::NULL)
|
|
|
|
warn(
|
|
|
|
- 'Error: You have unmet dependencies. (`yarn check` command failed)'.color(:red),
|
|
|
|
- 'Run `yarn install` to install missing modules.'.color(:green)
|
|
|
|
+ 'Error: You have unmet dependencies. (`yarnpkg check` command failed)'.color(:red),
|
|
|
|
+ 'Run `yarnpkg install` to install missing modules.'.color(:green)
|
|
|
|
)
|
|
|
|
abort
|
|
|
|
end
|
2020-03-12 18:50:15 +05:30
|
|
|
@@ -25,7 +25,7 @@
|
2019-03-15 23:05:39 +05:30
|
|
|
|
|
|
|
desc 'Install Node dependencies with Yarn'
|
|
|
|
task install: ['yarn:available'] do
|
2019-09-30 22:13:22 +05:30
|
|
|
- unless system('yarn install --pure-lockfile --ignore-engines --prefer-offline')
|
|
|
|
+ unless system('yarnpkg install --pure-lockfile --ignore-engines --prefer-offline')
|
2019-03-15 23:05:39 +05:30
|
|
|
abort 'Error: Unable to install node modules.'.color(:red)
|
|
|
|
end
|
|
|
|
end
|