mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
fix: address PR review feedback
- Remove duplicate killPtyProcess method in claude-usage-service.ts - Import and use spawnSync correctly instead of spawn.sync - Fix misleading comment about shell option and signal handling
This commit is contained in:
@@ -46,22 +46,6 @@ export class ClaudeUsageService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill a PTY process with platform-specific handling.
|
||||
* Windows doesn't support Unix signals like SIGTERM, so we call kill() without arguments.
|
||||
* On Unix-like systems (macOS, Linux), we can specify the signal.
|
||||
*
|
||||
* @param ptyProcess - The PTY process to kill
|
||||
* @param signal - The signal to send on Unix-like systems (default: 'SIGTERM')
|
||||
*/
|
||||
private killPtyProcess(ptyProcess: pty.IPty, signal: string = 'SIGTERM'): void {
|
||||
if (this.isWindows) {
|
||||
ptyProcess.kill();
|
||||
} else {
|
||||
ptyProcess.kill(signal);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Claude CLI is available on the system
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user