Do not override existing PLUGS file
This commit is contained in:
parent
df4980fc6b
commit
0f320f0e1a
@ -228,7 +228,12 @@ export class ExpressServer {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await this.space.getPageMeta("PLUGS");
|
||||
console.log("PLUGS file already exists, won't override it.");
|
||||
return;
|
||||
} catch {
|
||||
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- " +
|
||||
@ -236,6 +241,7 @@ export class ExpressServer {
|
||||
"\n```"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async reloadPlugs() {
|
||||
await this.space.updatePageList();
|
||||
|
Loading…
Reference in New Issue
Block a user