mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-12 20:07:31 +00:00
fix(cli): Fix Codex CLI execution issue in PowerShell with Hapi Codex (#763)
* fix(cli): fixed an issue where the codex cli failed to run successfully when using hapi codex in powershell * fix(cli): Fixes the issue of Windows Codex npm shim bypassing the launcher --------- Co-authored-by: xhd902 <xuhang@infypower.cn>
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
} from './utils/codexMcpConfig';
|
||||
import { codexSystemPrompt } from './utils/systemPrompt';
|
||||
import type { ReasoningEffort } from './appServerTypes';
|
||||
import { resolveCodexCommand } from './utils/codexExecutable';
|
||||
|
||||
/**
|
||||
* Filter out 'resume' subcommand which is managed internally by hapi.
|
||||
@@ -86,9 +87,11 @@ export async function codexLocal(opts: {
|
||||
return;
|
||||
}
|
||||
|
||||
const codexCommand = resolveCodexCommand();
|
||||
|
||||
await spawnWithTerminalGuard({
|
||||
command: 'codex',
|
||||
args,
|
||||
command: codexCommand.command,
|
||||
args: [...codexCommand.args, ...args],
|
||||
cwd: opts.path,
|
||||
env: process.env,
|
||||
signal: opts.abort,
|
||||
|
||||
Reference in New Issue
Block a user