From 8c972dac67164f407a94c3f5e419f980c399f3ce Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Thu, 25 Jul 2024 13:09:26 -0400 Subject: [PATCH] Don't leave a dir artifact where a file might go (#169) Co-authored-by: Alec Reynolds Co-authored-by: Mike Pirog --- utils/move-config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/move-config.js b/utils/move-config.js index 52d390201..596412aea 100644 --- a/utils/move-config.js +++ b/utils/move-config.js @@ -27,6 +27,7 @@ module.exports = (src, dest = os.tmpdir()) => { // Catch this so we can try to repair if (code !== 'EISDIR' || syscall !== 'open' || !!fs.mkdirSync(f, {recursive: true})) { + fs.removeSync(f); throw new Error(error); }