Skip to content

Commit

Permalink
fix: run venv after tools are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 16, 2024
1 parent 2d9d289 commit 6c94e87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/config/config_file/mise_toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ impl<'de> de::Deserialize<'de> for EnvList {
python: venv.python,
uv_create_args: venv.uv_create_args,
python_create_args: venv.python_create_args,
options: Default::default(),
options: EnvDirectiveOptions { tools: true },
});
}
}
Expand Down
11 changes: 1 addition & 10 deletions src/config/env_directive/venv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ impl EnvResults {
// TODO: in fact this should probably be moved to execute at the same time as src/uv.rs runs in ts.env() instead of config.env()
let config = Config::get();
let ts = ToolsetBuilder::new().build(&config)?;
let path = ts
.list_paths()
.into_iter()
.chain(env::split_paths(&env_vars[&*PATH_KEY]))
.collect::<Vec<_>>();
let ba = BackendArg::from("python");
let installed = ts
.versions
Expand Down Expand Up @@ -114,11 +109,7 @@ impl EnvResults {
.args(["-m", "venv", &venv.to_string_lossy()])
.args(extra)
}
.envs(env_vars)
.env(
PATH_KEY.to_string(),
env::join_paths(&path)?.to_string_lossy().to_string(),
);
.envs(env_vars);
cmd.execute()?;
}
}
Expand Down

0 comments on commit 6c94e87

Please sign in to comment.