diff --git a/@commitlint/read/src/index.js b/@commitlint/read/src/index.js index 6a1596801f..9323a34a48 100644 --- a/@commitlint/read/src/index.js +++ b/@commitlint/read/src/index.js @@ -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'); } }