From: Ruben Beltran del Rio Date: Fri, 9 Dec 2022 22:05:32 +0000 (+0100) Subject: Ensures blog exists on syncs X-Git-Tag: 5.0.0~11 X-Git-Url: https://git.r.bdr.sh/rbdr/blog/commitdiff_plain/f24ecd569d1945fbbdf18fad9398ea338d8eb2c6?ds=sidebyside Ensures blog exists on syncs --- diff --git a/lib/blog.js b/lib/blog.js index d2acbb4..fd5adaf 100644 --- a/lib/blog.js +++ b/lib/blog.js @@ -199,6 +199,7 @@ module.exports = class Blog { */ async syncDown() { internals.debuglog('Pulling remote state'); + await ensureDirectoryExists(this.postsDirectory); await Remote.syncDown(this.remoteConfig, this.blogDirectory) internals.debuglog('Pulled remote state'); } @@ -213,6 +214,7 @@ module.exports = class Blog { */ async syncUp() { internals.debuglog('Pushing remote state'); + await ensureDirectoryExists(this.postsDirectory); await Remote.syncUp(this.remoteConfig, this.blogDirectory) internals.debuglog('Pushed remote state'); }