Skip to content

Commit

Permalink
fix: commitlint env
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Aug 31, 2024
1 parent f43cab8 commit 05b903b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lint.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,15 @@ export function runCommitlintCommand(): void {
const config = fs.existsSync(localConfig) ? localConfig : sharedConfig

const env = {
...process.env, // important to pass it through, to preserve $PATH
GIT_BRANCH: git2.getCurrentBranchName(),
}

// await execWithArgs(`commitlint`, [`--edit`, editMsg, `--config`, config], { env })
exec2.spawn(`node ./node_modules/.bin/commitlint --edit ${editMsg} --config ${config}`, {
env,
passProcessEnv: false,
passProcessEnv: true, // important to pass it through, to preserve $PATH
forceColor: false,
log: false,
})
}

Expand Down

0 comments on commit 05b903b

Please sign in to comment.