diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-12-09 23:09:08 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-12-09 23:09:08 +0100 |
| commit | b0c3bb911306b2468152cf8a83c28eca843b7647 (patch) | |
| tree | b01ac62d1ab4faf809f2e617463256642b039d86 /lib | |
| parent | f24ecd569d1945fbbdf18fad9398ea338d8eb2c6 (diff) | |
Ignore errors on checkout
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/remotes/git.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/remotes/git.js b/lib/remotes/git.js index 11fdab8..c894122 100644 --- a/lib/remotes/git.js +++ b/lib/remotes/git.js @@ -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`); } |