Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Parse properly 'default' as environment Cli argument #1247

Merged
merged 5 commits into from
Apr 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/project/manifest/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl EnvironmentName {
/// to read from an environment variable, otherwise it will fall back to default
pub fn from_arg_or_env_var(arg_name: Option<String>) -> Self {
if let Some(arg_name) = arg_name {
return EnvironmentName::Named(arg_name);
return EnvironmentName::from_str(&arg_name).unwrap();
olivier-lacroix marked this conversation as resolved.
Show resolved Hide resolved
} else if std::env::var("PIXI_IN_SHELL").is_ok() {
if let Ok(env_var_name) = std::env::var("PIXI_ENVIRONMENT_NAME") {
if env_var_name == consts::DEFAULT_ENVIRONMENT_NAME {
Expand Down
Loading