Skip to content

Commit 8e47985

Browse files
huanghai21marionebl
authored andcommitted
fix: use sander.readFile correctly (#448) (#630)
* fix: modify the parameters for the sander.readFile function (#448) * fix: modify the parameters for the sander.readFile function (#448) - prettier lint fix
1 parent 6ccaf79 commit 8e47985

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

@commitlint/read/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async function getEditFilePath(top, edit) {
5959
if (dotgitStats.isDirectory()) {
6060
editFilePath = path.join(top, '.git/COMMIT_EDITMSG');
6161
} else {
62-
const gitFile = await sander.readFile(dotgitPath, 'utf8');
62+
const gitFile = await sander.readFile(dotgitPath, {encoding: 'utf-8'});
6363
const relativeGitPath = gitFile.replace('gitdir: ', '').replace('\n', '');
6464
editFilePath = path.resolve(top, relativeGitPath, 'COMMIT_EDITMSG');
6565
}

0 commit comments

Comments
 (0)