Skip to content

Commit

Permalink
Properly return Err when an error occur when removing a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelotrevisani committed Jan 4, 2024
1 parent 20d63ed commit deba8b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cli/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::path::PathBuf;
use std::str::FromStr;

use clap::Parser;
use miette::miette;
use rattler_conda_types::{NamelessMatchSpec, PackageName, Platform};

use crate::environment::LockFileUsage;
Expand Down Expand Up @@ -114,7 +115,7 @@ pub async fn execute(args: Args) -> miette::Result<()> {
DependencyRemovalResult::Conda(Err(e))
| DependencyRemovalResult::PyPi(Err(e))
| DependencyRemovalResult::Error(e) => {
eprintln!("{e}")
return Err(miette!("{e}"));
}
}
}
Expand Down

0 comments on commit deba8b4

Please sign in to comment.