Skip to content

Commit 15fc2ce

Browse files
committed
Discover named environments from the global workspaces dir
1 parent e0328fe commit 15fc2ce

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

crates/pixi_cli/src/cli_config.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use itertools::Itertools;
66
use miette::IntoDiagnostic;
77
use pep508_rs::Requirement;
88
use pixi_build_frontend::BackendOverride;
9-
use pixi_config::Config;
9+
use pixi_config::{Config, pixi_home};
1010
use pixi_consts::consts;
1111
use pixi_core::DependencyType;
1212
use pixi_core::Workspace;
@@ -47,10 +47,10 @@ impl WorkspaceConfig {
4747
if let Some(manifest_path) = &self.manifest_path {
4848
DiscoveryStart::ExplicitManifest(manifest_path.clone())
4949
} else if let Some(workspace) = &self.workspace {
50-
let config = Config::load_global();
51-
let path = config
52-
.named_workspace(&workspace.to_string())
53-
.expect("Unable to find workspace");
50+
let path = pixi_home()
51+
.expect("Unable to pixi home")
52+
.join(consts::DEFAULT_GLOBAL_WORKSPACE_DIR)
53+
.join(&workspace);
5454
DiscoveryStart::ExplicitManifest(path.clone())
5555
} else {
5656
DiscoveryStart::CurrentDir

0 commit comments

Comments
 (0)