From f24ecd569d1945fbbdf18fad9398ea338d8eb2c6 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Fri, 9 Dec 2022 23:05:32 +0100 Subject: Ensures blog exists on syncs --- lib/blog.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') 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'); } -- cgit