aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/licenses_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/licenses_command.rs')
-rw-r--r--crates/shirabe/src/command/licenses_command.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/crates/shirabe/src/command/licenses_command.rs b/crates/shirabe/src/command/licenses_command.rs
index 41e9ba90..1b2ec6b6 100644
--- a/crates/shirabe/src/command/licenses_command.rs
+++ b/crates/shirabe/src/command/licenses_command.rs
@@ -128,10 +128,7 @@ impl Command for LicensesCommand {
let locker = composer.get_locker().clone();
let mut locker = locker.borrow_mut();
if !locker.is_locked() {
- return Err(UnexpectedValueException {
- message: "Valid composer.json and composer.lock files are required to run this command with --locked".to_string(),
- code: 0,
- }.into());
+ return Err(UnexpectedValueException::new("Valid composer.json and composer.lock files are required to run this command with --locked".to_string()).into());
}
let no_dev = input
.borrow()
@@ -314,13 +311,10 @@ impl Command for LicensesCommand {
);
}
_ => {
- return Err(RuntimeException {
- message: format!(
- "Unsupported format \"{}\". See help for supported formats.",
- format
- ),
- code: 0,
- }
+ return Err(RuntimeException::new(format!(
+ "Unsupported format \"{}\". See help for supported formats.",
+ format
+ ))
.into());
}
}