fix: reload plugin not effect
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
392f01d509
commit
506184a104
@ -139,7 +139,7 @@ export class PluginManagerImpl implements plugin.PluginManager {
|
|||||||
loadFromFile(file: string, scanner = this.sacnnerMap.get('file')): plugin.Plugin {
|
loadFromFile(file: string, scanner = this.sacnnerMap.get('file')): plugin.Plugin {
|
||||||
if (!file) { throw new Error('plugin file can\'t be undefiend!') }
|
if (!file) { throw new Error('plugin file can\'t be undefiend!') }
|
||||||
if (!scanner) { throw new Error('plugin scanner can\'t be undefiend!') }
|
if (!scanner) { throw new Error('plugin scanner can\'t be undefiend!') }
|
||||||
let metadata = this.loadPlugin(scanner.read(file))
|
let metadata = this.loadPlugin(scanner.load(scanner.read(file)))
|
||||||
let plugin = metadata.loadMetadata.loader.build(metadata)
|
let plugin = metadata.loadMetadata.loader.build(metadata)
|
||||||
this.load(plugin)
|
this.load(plugin)
|
||||||
this.enable(plugin)
|
this.enable(plugin)
|
||||||
|
@ -44,7 +44,7 @@ export class JSFileScanner implements plugin.PluginScanner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private updatePlugin(file: any) {
|
private updatePlugin(file: any) {
|
||||||
var update = fs.file(fs.file(file.parentFile, 'update'), file.name)
|
var update = fs.file(fs.file(fs.file(file).parentFile, 'update'), file.name)
|
||||||
if (update.exists()) {
|
if (update.exists()) {
|
||||||
console.i18n("ms.plugin.manager.build.update", { name: file.name })
|
console.i18n("ms.plugin.manager.build.update", { name: file.name })
|
||||||
fs.move(update, file, true)
|
fs.move(update, file, true)
|
||||||
|
Loading…
Reference in New Issue
Block a user