Skip to content

Commit 5fe2074

Browse files
author
Alexander Lisianoi
committed
Remove old commit message file when uninstalling commitplease
1 parent dbfaa8b commit 5fe2074

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

uninstall.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,17 @@ for (var i = 0; i < dstHooks.length; ++i) {
2828
}
2929
}
3030
}
31+
32+
try {
33+
var options = require('commitplease').getOptions()
34+
35+
var oldMessagePath = path.join(
36+
process.cwd(), '..', '..', options.oldMessagePath
37+
)
38+
39+
fs.unlinkSync(oldMessagePath)
40+
} catch (err) {
41+
if (!/ENOENT/.test(err.message)) {
42+
throw err
43+
}
44+
}

0 commit comments

Comments
 (0)