aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/exec_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/exec_command.rs')
-rw-r--r--crates/shirabe/src/command/exec_command.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/crates/shirabe/src/command/exec_command.rs b/crates/shirabe/src/command/exec_command.rs
index d05b6c58..a67c234e 100644
--- a/crates/shirabe/src/command/exec_command.rs
+++ b/crates/shirabe/src/command/exec_command.rs
@@ -174,13 +174,10 @@ impl Command for ExecCommand {
.as_string()
.unwrap_or("")
.to_string();
- return Err(RuntimeException {
- message: format!(
- "No binaries found in composer.json or in bin-dir ({})",
- bin_dir
- ),
- code: 0,
- }
+ return Err(RuntimeException::new(format!(
+ "No binaries found in composer.json or in bin-dir ({})",
+ bin_dir
+ ))
.into());
}
@@ -222,9 +219,11 @@ impl Command for ExecCommand {
if let Some(ref iwd) = initial_working_directory
&& getcwd().as_deref() != Some(iwd.as_str())
{
- chdir(iwd).map_err(|e| RuntimeException {
- message: format!("Could not switch back to working directory \"{}\"", iwd),
- code: 0,
+ chdir(iwd).map_err(|e| {
+ RuntimeException::new(format!(
+ "Could not switch back to working directory \"{}\"",
+ iwd
+ ))
})?;
}