duplicate path in python-virtualenv

Open
#332 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
nodejs, python
Domain
cli, devtools

Research direction

Reproduce the issue with the provided python3 venv, activation, and nodeenv --python-virtualenv --node=lts commands, then inspect the nodeenv entry point handling --python-virtualenv and environment activation. Confirm the fix by reactivating .venv and verifying that .venv/bin appears only once in PATH.

Written by the indexing model from the issue text.

Description

bug

When installed into a running python3 venv, that path is duplicated. Fairly easy to reproduce.

python3 -m venv .venv
source .venv/bin/activate
tr : '\n' <<<$PATH

Notice that PATH is already prepended with the .venv/bin.

/HERE/.venv/bin
/usr/local/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/home/bozo/.local/bin
/home/bozo/bin

Then install nodeenv inside that active venv.

pip install nodeenv
nodeenv --python-virtualenv --node=lts

The next time you re-activate...

source .venv/bin/activate
tr : '\n' <<<$PATH

...that path is duplicated.

/HERE/.venv/lib/node_modules/.bin
/HERE/.venv/bin
/HERE/.venv/bin    <== whoops!
/usr/local/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/home/bozo/.local/bin
/home/bozo/bin
Dominant language
Python
Stars
1.8k
Forks
222
Avg merge
11h 11m
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ekalinin/nodeenv

All issues in ekalinin/nodeenv

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.