Skip to content

Commit

Permalink
fix: Interpolate error message when pavexc download fails
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMathWalker committed Apr 27, 2024
1 parent 6a60df9 commit a95d9c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion libs/pavex_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ fn download_or_compile(
return Ok(());
}
Err(e) => {
let _ = shell.warn("Download failed: {e}.\nI'll try compiling from source instead.");
let _ = shell.warn(format!(
"Download failed: {e}.\nI'll try compiling from source instead."
));
tracing::warn!(
error.msg = %e,
error.cause = ?e,
Expand Down
5 changes: 3 additions & 2 deletions libs/pavex_cli/src/pavexc/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ pub(super) fn install(
return Ok(());
}
Err(e) => {
let _ =
shell.warn("Download failed: {e}.\nI'll try compiling from source instead.");
let _ = shell.warn(format!(
"Download failed: {e}.\nI'll try compiling from source instead."
));
tracing::warn!(
error.msg = %e,
error.cause = ?e,
Expand Down

0 comments on commit a95d9c4

Please sign in to comment.