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 env name on adding #2279

Merged

Conversation

ruben-arts
Copy link
Contributor

fixes: #2245

Now parses the environment name

@ruben-arts
Copy link
Contributor Author

Btw tried to add a poper test but there was no framework to properly do that yet. Will have to improve that, but the feature/pixi-global has some more tools for that already.

@@ -26,7 +27,7 @@ pub struct Args {

pub async fn execute(mut project: Project, args: Args) -> miette::Result<()> {
let environment_exists = project
.environment(&EnvironmentName::Named(args.name.clone()))
.environment(&EnvironmentName::from_str(args.name.as_str())?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change the type of args.name to EnvironmentName like we do with pixi global?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied my suggestion in af2bc1f

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@ruben-arts ruben-arts enabled auto-merge (squash) October 15, 2024 14:16
@ruben-arts ruben-arts merged commit 6917132 into prefix-dev:main Oct 15, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Environment names not sanitized
2 participants