diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-19 10:37:35 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 9b474844e85cce916370693cc24f53339a695570 (patch) | |
tree | 10b1148a7581a2754e336a144c085a05ce72a1db /server/lib/plugins | |
parent | 32fe00138990627749da58ff9f845584013aa219 (diff) | |
download | PeerTube-9b474844e85cce916370693cc24f53339a695570.tar.gz PeerTube-9b474844e85cce916370693cc24f53339a695570.tar.zst PeerTube-9b474844e85cce916370693cc24f53339a695570.zip |
Add CLI plugins tests
Diffstat (limited to 'server/lib/plugins')
-rw-r--r-- | server/lib/plugins/yarn.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/plugins/yarn.ts b/server/lib/plugins/yarn.ts index 5fe1c5046..74c67653c 100644 --- a/server/lib/plugins/yarn.ts +++ b/server/lib/plugins/yarn.ts | |||
@@ -5,12 +5,12 @@ import { CONFIG } from '../../initializers/config' | |||
5 | import { outputJSON, pathExists } from 'fs-extra' | 5 | import { outputJSON, pathExists } from 'fs-extra' |
6 | import { join } from 'path' | 6 | import { join } from 'path' |
7 | 7 | ||
8 | async function installNpmPlugin (name: string, version?: string) { | 8 | async function installNpmPlugin (npmName: string, version?: string) { |
9 | // Security check | 9 | // Security check |
10 | checkNpmPluginNameOrThrow(name) | 10 | checkNpmPluginNameOrThrow(npmName) |
11 | if (version) checkPluginVersionOrThrow(version) | 11 | if (version) checkPluginVersionOrThrow(version) |
12 | 12 | ||
13 | let toInstall = name | 13 | let toInstall = npmName |
14 | if (version) toInstall += `@${version}` | 14 | if (version) toInstall += `@${version}` |
15 | 15 | ||
16 | await execYarn('add ' + toInstall) | 16 | await execYarn('add ' + toInstall) |