diff --git a/.changes/cli-icon-non-0-exit.md b/.changes/cli-icon-non-0-exit.md new file mode 100644 index 000000000..8b9826cea --- /dev/null +++ b/.changes/cli-icon-non-0-exit.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": "patch:bug" +"@tauri-apps/cli": "patch:bug" +--- + +Exit `tauri icon` with non-zero code when it fails. diff --git a/tooling/cli/src/icon.rs b/tooling/cli/src/icon.rs index ed3b33ac1..786f6bd25 100644 --- a/tooling/cli/src/icon.rs +++ b/tooling/cli/src/icon.rs @@ -138,11 +138,11 @@ pub fn command(options: Options) -> Result<()> { )) } } else { - panic!("Error loading image"); + anyhow::bail!("Error loading image"); }; if source.height() != source.width() { - panic!("Source image must be square"); + anyhow::bail!("Source image must be square"); } if png_icon_sizes.is_empty() {