Skip to content

Commit a2bf9a8

Browse files
committed
chore: release 1.0.2
1 parent 392308b commit a2bf9a8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

dist/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ async function apply_patch(base_path, patch_path, output_path) {
2929
throw new Error(`patch_path (${patch_path}) does not exist`)
3030
}
3131

32-
await execSync(`patch ${output_path} ${patch_path} -R`);
32+
await execSync(`patch -i ${patch_path} ${output_path} -R --no-backup-if-mismatch`);
33+
34+
const original_file = output_path + '.orig'
35+
// Delete `output.md.orig` file, if exists
36+
if (fs.existsSync(original_file)) {
37+
fs.rmSync(original_file, { force: true })
38+
}
3339
}
3440

3541
module.exports = { apply_patch }

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "code-of-conduct",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A tool for generating a code of conduct with patches",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)