changeset 1273:10748aa888a9

tasks (js_modules, sass): check for `yarnpkg` before `yarn`, as it is the name used in Debian
author Goffi <goffi@goffi.org>
date Tue, 26 May 2020 12:33:09 +0200
parents 3a3f3bccd65b
children eb4f03da0d7d
files libervia/server/tasks/implicit/task_js_modules.py libervia/server/tasks/implicit/task_sass.py
diffstat 2 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/tasks/implicit/task_js_modules.py	Mon May 25 15:51:07 2020 +0200
+++ b/libervia/server/tasks/implicit/task_js_modules.py	Tue May 26 12:33:09 2020 +0200
@@ -25,10 +25,7 @@
         with package_path.open('w') as f:
             json.dump(package, f)
 
-        try:
-            cmd = self.findCommand('yarn')
-        except exceptions.NotFound:
-            cmd = self.findCommand('npm')
+        cmd = self.findCommand('yarnpkg', 'yarn', 'npm')
         await self.runCommand(cmd, 'install', path=str(self.build_path))
 
         try:
--- a/libervia/server/tasks/implicit/task_sass.py	Mon May 25 15:51:07 2020 +0200
+++ b/libervia/server/tasks/implicit/task_sass.py	Tue May 26 12:33:09 2020 +0200
@@ -46,10 +46,7 @@
             with package_path.open('w') as f:
                 json.dump(package, f, indent=4)
 
-        try:
-            cmd = self.findCommand('yarn')
-        except exceptions.NotFound:
-            cmd = self.findCommand('npm')
+        cmd = self.findCommand('yarnpkg', 'yarn', 'npm')
         await self.runCommand(cmd, 'install', path=str(d_path))
 
         self.WATCH_DIRS = list(sass_dirs)