Skip to content

Commit 83b1a47

Browse files
ericcornelissenmarionebl
authored andcommitted
fix: resolve path to commit message for git submodules
because `path.resolve` should always be used for relative paths.
1 parent cc575fa commit 83b1a47

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
@@ -61,7 +61,7 @@ async function getEditFilePath(top, edit) {
6161
} else {
6262
const gitFile = await sander.readFile(dotgitPath, 'utf8');
6363
const relativeGitPath = gitFile.replace('gitdir: ', '').replace('\n', '');
64-
editFilePath = path.join(top, relativeGitPath, 'COMMIT_EDITMSG');
64+
editFilePath = path.resolve(top, relativeGitPath, 'COMMIT_EDITMSG');
6565
}
6666
}
6767

0 commit comments

Comments
 (0)