Skip to content

Commit

Permalink
fix: use read and write instead of copy
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Jan 15, 2018
1 parent 267f70c commit 04fcb53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
const utils = require('../src/utils')

const exists = require('fs').existsSync
const copy = require('fs').copyFileSync
const rename = require('fs').renameSync
const join = require('path').join
const read = require('fs').readFileSync
const write = require('fs').writeFileSync

const hooksDir = utils.getPathToHooks()
const hook = join(hooksDir, 'commit-msg')
Expand All @@ -15,4 +16,4 @@ if (exists(hook)) {
rename(hook, join(hooksDir, 'commit-msg.bak'))
}

copy(join(__dirname, 'commit-msg'), hook)
write(read(join(__dirname, '..', 'hooks', 'commit-msg')), hook)
File renamed without changes.

0 comments on commit 04fcb53

Please sign in to comment.