Apply suggestions from code review
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
9248881d42
commit
1a53567cb6
1 changed files with 9 additions and 4 deletions
|
|
@ -279,10 +279,15 @@ export async function runChildProcess(
|
|||
// These vars leak in when the Paperclip server itself is started from
|
||||
// within a Claude Code session (e.g. `npx paperclipai run` in a terminal
|
||||
// owned by Claude Code) or when cron inherits a contaminated shell env.
|
||||
delete rawMerged.CLAUDECODE;
|
||||
delete rawMerged.CLAUDE_CODE_ENTRYPOINT;
|
||||
delete rawMerged.CLAUDE_CODE_SESSION;
|
||||
delete rawMerged.CLAUDE_CODE_PARENT_SESSION;
|
||||
const CLAUDE_CODE_NESTING_VARS = [
|
||||
"CLAUDECODE",
|
||||
"CLAUDE_CODE_ENTRYPOINT",
|
||||
"CLAUDE_CODE_SESSION",
|
||||
"CLAUDE_CODE_PARENT_SESSION",
|
||||
] as const;
|
||||
for (const key of CLAUDE_CODE_NESTING_VARS) {
|
||||
delete rawMerged[key];
|
||||
}
|
||||
|
||||
const mergedEnv = ensurePathInEnv(rawMerged);
|
||||
void resolveSpawnTarget(command, args, opts.cwd, mergedEnv)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue