]> git.r.bdr.sh - rbdr/blog/commitdiff
Ignore errors on checkout
authorRuben Beltran del Rio <redacted>
Fri, 9 Dec 2022 22:09:08 +0000 (23:09 +0100)
committerRuben Beltran del Rio <redacted>
Fri, 9 Dec 2022 22:09:08 +0000 (23:09 +0100)
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`);
   }