aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/prohibits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart/src/commands/prohibits.rs')
-rw-r--r--crates/mozart/src/commands/prohibits.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/mozart/src/commands/prohibits.rs b/crates/mozart/src/commands/prohibits.rs
index ca3bc35..a6a70d5 100644
--- a/crates/mozart/src/commands/prohibits.rs
+++ b/crates/mozart/src/commands/prohibits.rs
@@ -25,7 +25,7 @@ pub struct ProhibitsArgs {
pub async fn execute(
args: &ProhibitsArgs,
cli: &super::Cli,
- _console: &mozart_core::console::Console,
+ console: &mozart_core::console::Console,
) -> anyhow::Result<()> {
let working_dir = match &cli.working_dir {
Some(dir) => PathBuf::from(dir),
@@ -35,11 +35,12 @@ pub async fn execute(
let packages = super::dependency::load_packages(&working_dir, args.locked)?;
if packages.is_empty() {
- println!(
- "{}",
- mozart_core::console::info("No packages found. Run `mozart install` first.")
+ console.write_error(
+ "No dependencies installed. Try running mozart install or update, or use --locked.",
);
- return Ok(());
+ return Err(mozart_core::exit_code::bail_silent(
+ mozart_core::exit_code::GENERAL_ERROR,
+ ));
}
// Parse the version constraint the user is asking about