mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Enable the python module in virtual envs (#584)
This will enable the python module when a virtual environment has been activated, this is detected via the `VIRTUAL_ENV` env var.
This commit is contained in:
committed by
Matan Kushner
parent
fa1267f12f
commit
42f6868e3f
@@ -27,7 +27,9 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
.set_extensions(&["py"])
|
||||
.is_match();
|
||||
|
||||
if !is_py_project {
|
||||
let is_venv = env::var("VIRTUAL_ENV").ok().is_some();
|
||||
|
||||
if !is_py_project && !is_venv {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user