The which utility doesn't use the correct path.
await $`python3 -m venv ${venvPath}`.quiet();
within(async () => { // not sure why this is needed, but doesn't work in top scope
// activate virtual env
$.prefix += `source ${path.join(venvPath, "bin/activate")};`;
echo(which.sync("pip3", { nothrow: true })); // /opt/homebrew/bin/pip3 - wrong path
echo(await $`which pip3`.quiet()); // /path/to/.venv/bin/pip3 - correct path
}))
Is there a way to update the path environment variable in the script?
The
whichutility doesn't use the correct path.