1
0

Do not override existing PLUGS file

This commit is contained in:
Zef Hemel
2022-08-10 12:03:58 +02:00
parent df4980fc6b
commit 0f320f0e1a
+7 -1
View File
@@ -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();