diff options
author | Chocobozzz <me@florianbigard.com> | 2022-11-14 14:49:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-11-14 16:21:59 +0100 |
commit | ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1 (patch) | |
tree | 31fc991c12ce66e0bcd59a3bc3cd563c15b24690 /server/lib | |
parent | a742347d50234793fceb08034c20e6881a65d544 (diff) | |
download | PeerTube-ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1.tar.gz PeerTube-ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1.tar.zst PeerTube-ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1.zip |
Add ability to install alpha/beta/rc plugin
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/plugins/yarn.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/plugins/yarn.ts b/server/lib/plugins/yarn.ts index d105b95e0..9cf6ec9e9 100644 --- a/server/lib/plugins/yarn.ts +++ b/server/lib/plugins/yarn.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { outputJSON, pathExists } from 'fs-extra' | 1 | import { outputJSON, pathExists } from 'fs-extra' |
2 | import { join } from 'path' | 2 | import { join } from 'path' |
3 | import { execShell } from '../../helpers/core-utils' | 3 | import { execShell } from '../../helpers/core-utils' |
4 | import { isNpmPluginNameValid, isPluginVersionValid } from '../../helpers/custom-validators/plugins' | 4 | import { isNpmPluginNameValid, isPluginStableOrUnstableVersionValid } from '../../helpers/custom-validators/plugins' |
5 | import { logger } from '../../helpers/logger' | 5 | import { logger } from '../../helpers/logger' |
6 | import { CONFIG } from '../../initializers/config' | 6 | import { CONFIG } from '../../initializers/config' |
7 | import { getLatestPluginVersion } from './plugin-index' | 7 | import { getLatestPluginVersion } from './plugin-index' |
@@ -69,5 +69,5 @@ function checkNpmPluginNameOrThrow (name: string) { | |||
69 | } | 69 | } |
70 | 70 | ||
71 | function checkPluginVersionOrThrow (name: string) { | 71 | function checkPluginVersionOrThrow (name: string) { |
72 | if (!isPluginVersionValid(name)) throw new Error('Invalid NPM plugin version to install') | 72 | if (!isPluginStableOrUnstableVersionValid(name)) throw new Error('Invalid NPM plugin version to install') |
73 | } | 73 | } |