From 6f0b002da14e26bfce70c2ad7a02d1d380b02306 Mon Sep 17 00:00:00 2001 From: Ole Eskild Steensen Date: Sun, 21 Jan 2024 14:50:10 +0100 Subject: [PATCH] Await the promise when deleting a file --- manifest-beta.json | 2 +- manifest.json | 2 +- src/publisher/Publisher.ts | 4 +++- versions.json | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/manifest-beta.json b/manifest-beta.json index 05b01ec..eb2d11e 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "digitalgarden", "name": "Digital Garden", - "version": "2.56.0", + "version": "2.56.1", "minAppVersion": "0.12.0", "description": "Publish your notes to the web for others to enjoy. For free.", "author": "Ole Eskild Steensen", diff --git a/manifest.json b/manifest.json index 05b01ec..eb2d11e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "digitalgarden", "name": "Digital Garden", - "version": "2.56.0", + "version": "2.56.1", "minAppVersion": "0.12.0", "description": "Publish your notes to the web for others to enjoy. For free.", "author": "Ole Eskild Steensen", diff --git a/src/publisher/Publisher.ts b/src/publisher/Publisher.ts index 8763c15..6562cd1 100644 --- a/src/publisher/Publisher.ts +++ b/src/publisher/Publisher.ts @@ -108,9 +108,11 @@ export default class Publisher { githubToken: this.settings.githubToken, }); - return !!userGardenConnection.deleteFile(path, { + const deleted = await userGardenConnection.deleteFile(path, { sha, }); + + return !!deleted; } async publish(file: CompiledPublishFile): Promise { diff --git a/versions.json b/versions.json index e0320d2..5899ceb 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,5 @@ { + "2.56.1": "0.12.0", "2.56.0": "0.12.0", "2.55.1": "0.12.0", "2.55.0": "0.12.0",