Do not override existing PLUGS file
This commit is contained in:
parent
df4980fc6b
commit
0f320f0e1a
@ -228,13 +228,19 @@ export class ExpressServer {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
await this.space.writePage(
|
await this.space.getPageMeta("PLUGS");
|
||||||
"PLUGS",
|
console.log("PLUGS file already exists, won't override it.");
|
||||||
"This file lists all plugs that SilverBullet will load. Run the `Plugs: Update` command to update and reload this list of plugs.\n\n```yaml\n- " +
|
return;
|
||||||
pluginNames.map((name) => `builtin:${name}`).join("\n- ") +
|
} catch {
|
||||||
"\n```"
|
console.log("Writing fresh PLUGS file.");
|
||||||
);
|
await this.space.writePage(
|
||||||
|
"PLUGS",
|
||||||
|
"This file lists all plugs that SilverBullet will load. Run the `Plugs: Update` command to update and reload this list of plugs.\n\n```yaml\n- " +
|
||||||
|
pluginNames.map((name) => `builtin:${name}`).join("\n- ") +
|
||||||
|
"\n```"
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async reloadPlugs() {
|
async reloadPlugs() {
|
||||||
|
Loading…
Reference in New Issue
Block a user