mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Add CLI plugins tests
This commit is contained in:
parent
32fe001389
commit
9b474844e8
22 changed files with 611 additions and 170 deletions
|
@ -5,12 +5,12 @@ import { CONFIG } from '../../initializers/config'
|
|||
import { outputJSON, pathExists } from 'fs-extra'
|
||||
import { join } from 'path'
|
||||
|
||||
async function installNpmPlugin (name: string, version?: string) {
|
||||
async function installNpmPlugin (npmName: string, version?: string) {
|
||||
// Security check
|
||||
checkNpmPluginNameOrThrow(name)
|
||||
checkNpmPluginNameOrThrow(npmName)
|
||||
if (version) checkPluginVersionOrThrow(version)
|
||||
|
||||
let toInstall = name
|
||||
let toInstall = npmName
|
||||
if (version) toInstall += `@${version}`
|
||||
|
||||
await execYarn('add ' + toInstall)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue