Skip to content

Commit

Permalink
chore: release 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Nov 22, 2022
1 parent 392308b commit a2bf9a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ async function apply_patch(base_path, patch_path, output_path) {
throw new Error(`patch_path (${patch_path}) does not exist`)
}

await execSync(`patch ${output_path} ${patch_path} -R`);
await execSync(`patch -i ${patch_path} ${output_path} -R --no-backup-if-mismatch`);

const original_file = output_path + '.orig'
// Delete `output.md.orig` file, if exists
if (fs.existsSync(original_file)) {
fs.rmSync(original_file, { force: true })
}
}

module.exports = { apply_patch }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "code-of-conduct",
"version": "1.0.1",
"version": "1.0.2",
"description": "A tool for generating a code of conduct with patches",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit a2bf9a8

Please sign in to comment.