diff --git a/src/cli/run.rs b/src/cli/run.rs index 315b917b5..b020cb60e 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -59,7 +59,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { let environment = project.environment_from_name_or_env_var(args.environment.clone())?; // Find the environment to run the task in, if any were specified. - let explicit_environment = if environment.is_default() { + let explicit_environment = if args.environment.is_none() { None } else { Some(environment.clone())