Skip to content

Commit

Permalink
error out with a new Error variant
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula authored Apr 15, 2024
1 parent e54bacb commit 5e9e873
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/packager/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ fn run_cli(cli: Cli) -> Result<()> {
};

if configs.is_empty() {
return Err(crate::Error::NoConfig);
tracing::error!("Couldn't detect a valid configuration file or all configurations are disabled! Nothing to do here.");
std::process::exit(1);
}

let cli_out_dir = cli.out_dir.as_ref().map(dunce::canonicalize).transpose()?;
Expand Down
3 changes: 0 additions & 3 deletions crates/packager/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ pub enum Error {
/// Target triple environment error
#[error("Unable to determine target-environment")]
Environment,
/// No config file found.
#[error("Couldn't detect a valid configuration file or all configurations are disabled.")]
NoConfig,
/// I/O errors.
#[error(transparent)]
Io(#[from] std::io::Error),
Expand Down

0 comments on commit 5e9e873

Please sign in to comment.