Skip to content

Commit

Permalink
fix: resolve path to commit message for git submodules
Browse files Browse the repository at this point in the history
because `path.resolve` should always be used for relative paths.
  • Loading branch information
ericcornelissen authored and marionebl committed Jan 27, 2019
1 parent cc575fa commit 83b1a47
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 @@ -61,7 +61,7 @@ async function getEditFilePath(top, edit) {
} else {
const gitFile = await sander.readFile(dotgitPath, 'utf8');
const relativeGitPath = gitFile.replace('gitdir: ', '').replace('\n', '');
editFilePath = path.join(top, relativeGitPath, 'COMMIT_EDITMSG');
editFilePath = path.resolve(top, relativeGitPath, 'COMMIT_EDITMSG');
}
}

Expand Down

0 comments on commit 83b1a47

Please sign in to comment.