Skip to content

Commit

Permalink
fix: use sander.readFile correctly (#448) (#630)
Browse files Browse the repository at this point in the history
* fix: modify the parameters for the sander.readFile function (#448)

* fix: modify the parameters for the sander.readFile function (#448) - prettier lint fix
  • Loading branch information
huanghai21 authored and marionebl committed May 2, 2019
1 parent 6ccaf79 commit 8e47985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion @commitlint/read/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function getEditFilePath(top, edit) {
if (dotgitStats.isDirectory()) {
editFilePath = path.join(top, '.git/COMMIT_EDITMSG');
} else {
const gitFile = await sander.readFile(dotgitPath, 'utf8');
const gitFile = await sander.readFile(dotgitPath, {encoding: 'utf-8'});
const relativeGitPath = gitFile.replace('gitdir: ', '').replace('\n', '');
editFilePath = path.resolve(top, relativeGitPath, 'COMMIT_EDITMSG');
}
Expand Down

0 comments on commit 8e47985

Please sign in to comment.