diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-22 11:18:22 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 587568e1cc0e33c023c1ac62dd28fef313285250 (patch) | |
tree | e905b243d8a5fe5fb18ef5ef821c867cdde45aa6 /server/lib/plugins/plugin-manager.ts | |
parent | 6691c52280363fc42f7865230ebb3741f02fff23 (diff) | |
download | PeerTube-587568e1cc0e33c023c1ac62dd28fef313285250.tar.gz PeerTube-587568e1cc0e33c023c1ac62dd28fef313285250.tar.zst PeerTube-587568e1cc0e33c023c1ac62dd28fef313285250.zip |
Add plugin table migration table
Diffstat (limited to 'server/lib/plugins/plugin-manager.ts')
-rw-r--r-- | server/lib/plugins/plugin-manager.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts index 6485a47c5..afc07a151 100644 --- a/server/lib/plugins/plugin-manager.ts +++ b/server/lib/plugins/plugin-manager.ts | |||
@@ -125,6 +125,13 @@ export class PluginManager implements ServerHook { | |||
125 | try { | 125 | try { |
126 | await this.registerPluginOrTheme(plugin) | 126 | await this.registerPluginOrTheme(plugin) |
127 | } catch (err) { | 127 | } catch (err) { |
128 | // Try to unregister the plugin | ||
129 | try { | ||
130 | await this.unregister(PluginModel.buildNpmName(plugin.name, plugin.type)) | ||
131 | } catch { | ||
132 | // we don't care if we cannot unregister it | ||
133 | } | ||
134 | |||
128 | logger.error('Cannot register plugin %s, skipping.', plugin.name, { err }) | 135 | logger.error('Cannot register plugin %s, skipping.', plugin.name, { err }) |
129 | } | 136 | } |
130 | } | 137 | } |