project: Normalize Path env var to PATH in shell env on windows (#40720)

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-10-22 22:47:16 +00:00
committed by GitHub
parent ca4103246f
commit c16f2a1a29
3 changed files with 14 additions and 10 deletions
+7 -3
View File
@@ -1344,9 +1344,13 @@ impl pet_core::os_environment::Environment for EnvironmentApi<'_> {
fn get_know_global_search_locations(&self) -> Vec<PathBuf> {
if self.global_search_locations.lock().is_empty() {
let mut paths =
std::env::split_paths(&self.get_env_var("PATH".to_string()).unwrap_or_default())
.collect::<Vec<PathBuf>>();
let mut paths = std::env::split_paths(
&self
.get_env_var("PATH".to_string())
.or_else(|| self.get_env_var("Path".to_string()))
.unwrap_or_default(),
)
.collect::<Vec<PathBuf>>();
log::trace!("Env PATH: {:?}", paths);
for p in self.pet_env.get_know_global_search_locations() {