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: should now use the activated environment when running a task #1461

Merged

Conversation

tdejager
Copy link
Contributor

Use the recently-added logic for figuring out the env name from an activated shell. Should fix: #1435

src/cli/run.rs Outdated
.map(|n| EnvironmentName::from_str(n.as_str()))
.transpose()?
.map(|n| {
let env_name = EnvironmentName::from_arg_or_env_var(args.environment).into_diagnostic()?;
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't it possible to do this:

let explicit_environment = project.environment_from_name_or_env_var(args.environment)?;

Copy link
Contributor

Choose a reason for hiding this comment

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

Now all tools that use this function also warn the user at the end that it was used:

Project::warn_on_discovered_from_env(args.manifest_path.as_deref());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For 1) changed, 2) that warning seems to be there?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah sorry didn't check as I assumed it was never added. This feels like a merge conflict fix.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Thanks Tim!

@ruben-arts ruben-arts enabled auto-merge (squash) May 30, 2024 12:31
@ruben-arts ruben-arts merged commit b7d3816 into prefix-dev:main May 30, 2024
24 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.

Tasks do not run in the active environment by default.
3 participants