unset PKG_EXECPATH before invoking safe-chain binary

This commit is contained in:
Reinier Criel 2026-05-13 14:33:58 -07:00
parent 0c8de1e606
commit d9b7aefd34
5 changed files with 78 additions and 5 deletions

View file

@ -1,5 +1,11 @@
#!/usr/bin/env node
// Strip PKG_EXECPATH from the environment so any child process safe-chain
// spawns (npm, uv, pip, …) doesn't inherit it. If it leaks into a subsequent
// safe-chain invocation (e.g. via a shim) the yao-pkg bootstrap would treat
// argv[1] as a script path and fail with MODULE_NOT_FOUND.
delete process.env.PKG_EXECPATH;
import chalk from "chalk";
import { ui } from "../src/environment/userInteraction.js";
import { setup } from "../src/shell-integration/setup.js";