diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-12-09 23:05:32 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-12-09 23:05:32 +0100 |
| commit | f24ecd569d1945fbbdf18fad9398ea338d8eb2c6 (patch) | |
| tree | 9c3e80b668f123b5cc1a8da2332885a95224efcd /lib | |
| parent | d3f282a164e44f54678cdb45aad7a09c8a92b89e (diff) | |
Ensures blog exists on syncs
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/blog.js | 2 |
1 files changed, 2 insertions, 0 deletions
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'); } |