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

feat: Default to PIXI_ENVIRONMENT_NAME in pixi list #900

Closed
wants to merge 5 commits into from

Conversation

sumanth-manchala
Copy link
Contributor

@sumanth-manchala sumanth-manchala commented Mar 2, 2024

closes #893

I went ahead with @pavelzw suggestion, please let me know if this needs to thought through

image

@sumanth-manchala sumanth-manchala changed the title Default to PIXI_ENVIRONMENT_NAME in pixi list feat: Default to PIXI_ENVIRONMENT_NAME in pixi list Mar 2, 2024
src/cli/list.rs Outdated Show resolved Hide resolved
@baszalmstra baszalmstra added enhancement New feature or request needs-decision Undecided if this should be done labels Mar 2, 2024
@baszalmstra
Copy link
Contributor

This also affects #889, there is a discussion going there about whether or not adding the environment variable is a good idea. I'd like to wait until that is resolved.

@sumanth-manchala
Copy link
Contributor Author

While testing this, I found the below issue

image

EnvironmentName::Default != EnvironmentName::Named("default") when searching in IndexMap
https://github.com/prefix-dev/pixi/blob/main/src/project/manifest/mod.rs#L812

Any recommendation on tackling this?

@baszalmstra
Copy link
Contributor

I think we should maybe just refactor EnvironmentName into

struct EnvironmentName(String)

if the name is "default" it is the default environment name.

@baszalmstra
Copy link
Contributor

Alternatively you could first parse the String argument into EnvironmentName using FromStr or change the type of the env arg from String to EnvironmentName.

@ruben-arts
Copy link
Contributor

This was fixed in #1080

@ruben-arts ruben-arts closed this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-decision Undecided if this should be done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pixi list should default to the shell-environment if active
3 participants