From 83b1a47d9bc2c9e65172abcb0894ba12d7d93865 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Wed, 24 Oct 2018 16:44:49 +0300 Subject: [PATCH] fix: resolve path to commit message for git submodules because `path.resolve` should always be used for relative paths. --- @commitlint/read/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); } }