Skip to content

Commit

Permalink
missing input deps is a println!, not fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
colemickens committed Jun 21, 2024
1 parent 5e203b8 commit 781d35b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ pub enum FlakeCheckerError {
Render(#[from] handlebars::RenderError),
#[error("handlebars template error: {0}")]
Template(#[from] Box<handlebars::TemplateError>),
#[error("invalid flake.lock: {0}")]
Invalid(String),
}
3 changes: 1 addition & 2 deletions src/flake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,11 @@ fn nixpkgs_deps(
.collect();

if !missing.is_empty() {
let error_msg = format!(
println!(
"no nixpkgs dependency found for specified {}: {}",
if missing.len() > 1 { "keys" } else { "key" },
missing.join(", ")
);
return Err(FlakeCheckerError::Invalid(error_msg));
}

Ok(deps)
Expand Down

0 comments on commit 781d35b

Please sign in to comment.