]> git.r.bdr.sh - rbdr/blog/blobdiff - lib/remotes/git.js
Ignore errors on checkout
[rbdr/blog] / lib / remotes / git.js
index 11fdab89ddda38da508e6545c2e009ccbb49d1cc..c894122c345a0e6877528127e85d7396bb16a065 100644 (file)
@@ -24,7 +24,10 @@ module.exports = {
   async syncDown(remote, blogDirectory) {
 
     await internals.exec(`cd ${blogDirectory} && git init`);
-    await internals.exec(`cd ${blogDirectory} && git checkout .`);
+    try {
+      await internals.exec(`cd ${blogDirectory} && git checkout .`);
+    }
+    catch {}
     await internals.exec(`cd ${blogDirectory} && git clean . -f`);
     await internals.exec(`cd ${blogDirectory} && git pull ${remote} main`);
   }