posit-dev / posit-dev/positron

R terminal prompt shows "venv" after arriving at the R project from a Python project that was using a venv

Open
#3,571 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug lang: python
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Positron Version:

Positron Version: 2024.06.0 (Universal) build 770
Code - OSS Version: 1.90.0
Commit: 5d79ea68dceb5b734475af851b64cb3c0a323285
Date: 2024-06-14T05:53:04.122Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.4.0

Steps to reproduce the issue:

  1. Activate a venv in a Python project, in my case a pyenv using Python 3.12.2
  2. Observe the "venv" in the terminal prompt
  3. switch to another project, in my case an R project that does not have a venv, running R 4.3.3
  4. click the terminal tab in the R project
  5. option: may need to click the console tab then back to the terminal tab
  6. Observe "venv" still in the terminal prompt

What did you expect to happen?

I expected the terminal instances in the separate projects to be separate enough that being in a venv in one project would not affect the terminal prompt in another project. That is, I did not expect to see "venv" in the terminal prompt in my R project.

Were there any error messages in the output or Developer Tools console?

No

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the listed workflow: activate a Python venv, switch to the R project, and inspect the terminal prompt. Trace how terminal instances and environment state are handled across projects; done means the R project's prompt no longer retains the venv indicator from the Python project.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, r, typescript
Domain
cli, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.