From 8748bb74dca70ab3a2134fffcf978ed0a36c6db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=81=EA=B2=BD=EB=AF=B8?= Date: Fri, 22 May 2026 02:12:09 +0900 Subject: [PATCH 1/2] fix: handle absolute commitMessagePath in git worktree environment --- packages/commit-helper/bin/cli.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/commit-helper/bin/cli.ts b/packages/commit-helper/bin/cli.ts index 96ccc85..9d3916e 100644 --- a/packages/commit-helper/bin/cli.ts +++ b/packages/commit-helper/bin/cli.ts @@ -1,6 +1,6 @@ import {exec} from 'child_process' import fs from 'fs/promises' -import {join} from 'path' +import {isAbsolute, join} from 'path' import process from 'process' import {cosmiconfigSync} from 'cosmiconfig' @@ -182,7 +182,7 @@ export async function run() { } const commitMessagePath = cli.input[0] - const commitFilePath = join(process.cwd(), commitMessagePath) + const commitFilePath = isAbsolute(commitMessagePath) ? commitMessagePath : join(process.cwd(), commitMessagePath) const commitMessage = await fs.readFile(commitFilePath, 'utf8') if (!commitMessage) { From 654bc32f646f96d6f420523fc8e7c61939199fb2 Mon Sep 17 00:00:00 2001 From: Koong Kyungmi Date: Fri, 22 May 2026 02:29:18 +0900 Subject: [PATCH 2/2] Fix COMMIT_EDITMSG path handling in git worktree Fix handling of absolute path for COMMIT_EDITMSG in git worktree environment. --- .changeset/dirty-actors-retire.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/dirty-actors-retire.md diff --git a/.changeset/dirty-actors-retire.md b/.changeset/dirty-actors-retire.md new file mode 100644 index 0000000..7253d9a --- /dev/null +++ b/.changeset/dirty-actors-retire.md @@ -0,0 +1,7 @@ +--- +"@naverpay/commit-helper": patch +--- + +[commithelper] fix: git worktree 환경에서 COMMIT_EDITMSG 절대 경로 처리 + +PR: [[commithelper] fix: git worktree 환경에서 COMMIT_EDITMSG 절대 경로 처리](https://github.com/NaverPayDev/cli/pull/74)