Skip to content

Commit

Permalink
🐛 Fix commit hook creation on Windows (#61)
Browse files Browse the repository at this point in the history
Fixes #58
  • Loading branch information
carloscuesta authored Aug 6, 2017
1 parent f368117 commit 3211c29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gitmoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GitmojiCli {
}

fs.writeFile(
process.env.PWD + constants.HOOK_PATH, constants.HOOK_FILE_CONTENTS,
process.cwd() + constants.HOOK_PATH, constants.HOOK_FILE_CONTENTS,
{ mode: constants.HOOK_PERMISSIONS },
(err) => {
if (err) this._errorMessage(err)
Expand All @@ -52,7 +52,7 @@ class GitmojiCli {
return this._errorMessage('Couldn\'t remove hook, not a git repository')
}

fs.unlink(process.env.PWD + constants.HOOK_PATH, (err) => {
fs.unlink(process.cwd() + constants.HOOK_PATH, (err) => {
if (err) return this._errorMessage(err)
return console.log(
`${chalk.yellow('gitmoji')} commit hook unlinked successfully.`
Expand Down

0 comments on commit 3211c29

Please sign in to comment.