Skip to content

Commit 392308b

Browse files
committed
fix: remove .orig file if exists
1 parent 6065c9d commit 392308b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/runner.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ async function apply_patch(base_path, patch_path, output_path) {
2424
}
2525

2626
await execSync(`patch -i ${patch_path} ${output_path} -R --no-backup-if-mismatch`);
27+
28+
const original_file = output_path + '.orig'
29+
// Delete `output.md.orig` file, if exists
30+
if (fs.existsSync(original_file)) {
31+
fs.rmSync(original_file, { force: true })
32+
}
2733
}
2834

2935
module.exports = { apply_patch }

0 commit comments

Comments
 (0)