mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2026-09-03 20:53:09 -05:00
Prevent warning at startup
This commit is contained in:
@@ -304,12 +304,12 @@ export class PluginManager implements ServerHook {
|
||||
this.sortHooksByPriority()
|
||||
}
|
||||
|
||||
async removeUnsecurePluginsIfNeeded () {
|
||||
async removeUnsecurePluginsIfNeededBeforeRegistration () {
|
||||
for (const npmName of UNSECURE_PLUGINS_TO_REMOVE) {
|
||||
const plugin = await PluginModel.loadByNpmName(npmName)
|
||||
if (!plugin || plugin.uninstalled === true) continue
|
||||
|
||||
await this.uninstall({ npmName })
|
||||
await this.uninstall({ npmName, unregister: false })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -349,7 +349,7 @@ async function startApplication () {
|
||||
server.listen(port, hostname, async () => {
|
||||
if (cliOptions.plugins) {
|
||||
try {
|
||||
await PluginManager.Instance.removeUnsecurePluginsIfNeeded()
|
||||
await PluginManager.Instance.removeUnsecurePluginsIfNeededBeforeRegistration()
|
||||
|
||||
await PluginManager.Instance.rebuildNativePluginsIfNeeded()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user