Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flox activate reactivates the environment #1415

Open
ghudgins opened this issue May 8, 2024 · 5 comments
Open

flox activate reactivates the environment #1415

ghudgins opened this issue May 8, 2024 · 5 comments
Labels
enhancement Improvement to existing functionality product Tickets relevant to the flox product team and/or functional requirements team-cli Tickets relevant to the flox CLI team

Comments

@ghudgins
Copy link
Contributor

ghudgins commented May 8, 2024

When I launch a vscode shell from an active Flox environment
I need a flox activate to allow me to refresh the environment
So I can avoid having to close and re-open vscode to get environment hook updates, etc

Acceptance Criteria

Given I have flox activate a path environment in the current directory
When I run flox activate again from the same directory
Then I see the environment is activated again (equivalent of exit && flox activate)

@ghudgins ghudgins added enhancement Improvement to existing functionality team-cli Tickets relevant to the flox CLI team product Tickets relevant to the flox product team and/or functional requirements labels May 8, 2024
@ghudgins
Copy link
Contributor Author

ghudgins commented May 8, 2024

+1 from user research

@mkenigs
Copy link
Contributor

mkenigs commented May 8, 2024

I don't quite understand the vscode motivation combined with the AC. Does exit && flox activate solve the vscode case? If not, how would making flox activate do what exit && flox activate does solve the vscode case?

@ghudgins
Copy link
Contributor Author

ghudgins commented May 8, 2024

try this:

  • in a project directory create an environment
  • activate it
  • enter the IDE
  • attempt to get dependencies in path...fail
  • attempt to activate...fail
image

vs. if I open IDE before I activate I can get it to work

image

Does exit && flox activate solve the vscode case?

no because the IDE's terminal was always spawned inside of an env

@mkenigs
Copy link
Contributor

mkenigs commented May 8, 2024

Hmm it looks like vscode is inheriting environment variables (e.g. _FLOX_ACTIVE_ENVIRONMENTS) but somehow PATH is getting messed up. Needs some more investigation

@ghudgins
Copy link
Contributor Author

ghudgins commented May 8, 2024

fair enough! happy to morph this issue into another solution if there's a better way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing functionality product Tickets relevant to the flox product team and/or functional requirements team-cli Tickets relevant to the flox CLI team
Projects
None yet
Development

No branches or pull requests

2 participants