Skip to content

Commit

Permalink
Print full command in error and remove unnecessary new line.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Githinji committed Mar 6, 2025
1 parent c9fef6e commit 7839923
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ fn install_tools() -> Result<(), DynError> {

if !status.success() {
let error_message = format!(
"cargo install {} {} exited with status code: {}",
args.get(0).unwrap(),
args.get(1).unwrap(),
"Command 'cargo install {}' exited with status code: {}",
args.join(" "),
status.code().unwrap()
);
return Err(Box::from(error_message));
Expand All @@ -62,8 +61,7 @@ fn get_help_string(task: Option<&str>) -> String {
format!(
"Unrecognized task '{t}'. Available tasks:
install-tools Installs the tools the project depends on.
"
install-tools Installs the tools the project depends on."
)
} else {
"Missing task. To execute a task run `cargo xtask [task]`.".to_string()
Expand Down

0 comments on commit 7839923

Please sign in to comment.