X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=server%2Flib%2Fplugins%2Fyarn.ts;h=9cf6ec9e90e53be6f281c312130f1ab7654109bb;hb=ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1;hp=d105b95e07d3ce0ecd0bbd888f97127556b1409f;hpb=a742347d50234793fceb08034c20e6881a65d544;p=github%2FChocobozzz%2FPeerTube.git 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 @@ import { outputJSON, pathExists } from 'fs-extra' import { join } from 'path' import { execShell } from '../../helpers/core-utils' -import { isNpmPluginNameValid, isPluginVersionValid } from '../../helpers/custom-validators/plugins' +import { isNpmPluginNameValid, isPluginStableOrUnstableVersionValid } from '../../helpers/custom-validators/plugins' import { logger } from '../../helpers/logger' import { CONFIG } from '../../initializers/config' import { getLatestPluginVersion } from './plugin-index' @@ -69,5 +69,5 @@ function checkNpmPluginNameOrThrow (name: string) { } function checkPluginVersionOrThrow (name: string) { - if (!isPluginVersionValid(name)) throw new Error('Invalid NPM plugin version to install') + if (!isPluginStableOrUnstableVersionValid(name)) throw new Error('Invalid NPM plugin version to install') }