We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f368117 commit 3211c29Copy full SHA for 3211c29
src/gitmoji.js
@@ -36,7 +36,7 @@ class GitmojiCli {
36
}
37
38
fs.writeFile(
39
- process.env.PWD + constants.HOOK_PATH, constants.HOOK_FILE_CONTENTS,
+ process.cwd() + constants.HOOK_PATH, constants.HOOK_FILE_CONTENTS,
40
{ mode: constants.HOOK_PERMISSIONS },
41
(err) => {
42
if (err) this._errorMessage(err)
@@ -52,7 +52,7 @@ class GitmojiCli {
52
return this._errorMessage('Couldn\'t remove hook, not a git repository')
53
54
55
- fs.unlink(process.env.PWD + constants.HOOK_PATH, (err) => {
+ fs.unlink(process.cwd() + constants.HOOK_PATH, (err) => {
56
if (err) return this._errorMessage(err)
57
return console.log(
58
`${chalk.yellow('gitmoji')} commit hook unlinked successfully.`
0 commit comments