Skip to content

which utility not working correctly when using $.prefix #688

Description

@ivancuric

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions