fix(gitFs): try/catch deletes

This commit is contained in:
Rhys Arkins 2019-05-01 09:33:44 +02:00
parent 2714104f47
commit bab94337eb

View file

@ -328,7 +328,15 @@ class Storage {
fileNames.unshift('-f');
}
if (fileNames.length) await git.add(fileNames);
if (deleted.length) await git.rm(deleted);
if (deleted.length) {
for (const f of deleted) {
try {
await git.rm([f]);
} catch (err) {
logger.debug({ err }, 'Cannot delete ' + f);
}
}
}
await git.commit(message);
await git.push([
'origin',