Skip to content

Commit

Permalink
Await the promise when deleting a file
Browse files Browse the repository at this point in the history
  • Loading branch information
oleeskild committed Jan 21, 2024
1 parent 699e92d commit 6f0b002
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest-beta.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/publisher/Publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean> {
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 6f0b002

Please sign in to comment.