Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/dirty-actors-retire.md
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions packages/commit-helper/bin/cli.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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) {
Expand Down
Loading