-
Notifications
You must be signed in to change notification settings - Fork 210
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
fix: should now use the activated environment when running a task #1461
Conversation
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()?; |
There was a problem hiding this comment.
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)?;
There was a problem hiding this comment.
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());
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Tim!
Use the recently-added logic for figuring out the env name from an activated shell. Should fix: #1435