fix: use process.cwd() consistently across all platforms

Address PR review comment - use process.cwd() for Windows too instead of
USERPROFILE/homedir fallback for consistency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-14 17:53:13 +01:00
parent cb910feae9
commit 13eead3855

View File

@@ -171,9 +171,7 @@ export class ClaudeUsageService {
let hasSeenTrustPrompt = false;
// Use current working directory (project dir) - most likely already trusted by Claude CLI
const workingDirectory = this.isWindows
? process.env.USERPROFILE || os.homedir() || 'C:\\'
: process.cwd();
const workingDirectory = process.cwd();
// Use platform-appropriate shell and command
const shell = this.isWindows ? 'cmd.exe' : '/bin/sh';