aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins/yarn.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-19 14:36:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit09071200c73f5358e1d0bfb61a274e4f2c4ec52b (patch)
tree602749b149df1675518846dd223105196b19a557 /server/lib/plugins/yarn.ts
parent9b474844e85cce916370693cc24f53339a695570 (diff)
downloadPeerTube-09071200c73f5358e1d0bfb61a274e4f2c4ec52b.tar.gz
PeerTube-09071200c73f5358e1d0bfb61a274e4f2c4ec52b.tar.zst
PeerTube-09071200c73f5358e1d0bfb61a274e4f2c4ec52b.zip
Add plugin API tests
Diffstat (limited to 'server/lib/plugins/yarn.ts')
-rw-r--r--server/lib/plugins/yarn.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/plugins/yarn.ts b/server/lib/plugins/yarn.ts
index 74c67653c..e40351b6e 100644
--- a/server/lib/plugins/yarn.ts
+++ b/server/lib/plugins/yarn.ts
@@ -13,7 +13,9 @@ async function installNpmPlugin (npmName: string, version?: string) {
13 let toInstall = npmName 13 let toInstall = npmName
14 if (version) toInstall += `@${version}` 14 if (version) toInstall += `@${version}`
15 15
16 await execYarn('add ' + toInstall) 16 const { stdout } = await execYarn('add ' + toInstall)
17
18 logger.debug('Added a yarn package.', { yarnStdout: stdout })
17} 19}
18 20
19async function installNpmPluginFromDisk (path: string) { 21async function installNpmPluginFromDisk (path: string) {
@@ -46,7 +48,7 @@ async function execYarn (command: string) {
46 await outputJSON(pluginPackageJSON, {}) 48 await outputJSON(pluginPackageJSON, {})
47 } 49 }
48 50
49 await execShell(`yarn ${command}`, { cwd: pluginDirectory }) 51 return execShell(`yarn ${command}`, { cwd: pluginDirectory })
50 } catch (result) { 52 } catch (result) {
51 logger.error('Cannot exec yarn.', { command, err: result.err, stderr: result.stderr }) 53 logger.error('Cannot exec yarn.', { command, err: result.err, stderr: result.stderr })
52 54