detect_venv should not use shell for activation #37177
WeetHet
started this conversation in
Language Support
Replies: 2 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Can you elaborate on why it is horrible? IMHO using an activation script is kinda neat in that we're not making assumptions about the contents of that activation - thus, it works as if you opened the terminal and ran the script itself. cc @Veykril |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is horrible
zed/crates/project/src/terminals.rs
Lines 133 to 223 in 11fb57a
We can just set the env ourselves either the same way it's done for direnv with
shell_hook
(spawn a shell, get the environment after) or just updatePATH
andVIRTUAL_ENV
manually when starting terminalBoth the current and the first approach aren't portable so I vote for the second approach. It will still need to be adjusted for windows having
/Scripts
and not/bin
but at least it would work since I haven't been able to successfully make automatic venv activation on windows work myselfBeta Was this translation helpful? Give feedback.
All reactions