mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-08-17 03:40:23 +03:00
fix(cli/icon): return with an error instead of panic (#9638)
* fix(cli/icon): return with an error instead of panic closes #9636 * Update .changes/cli-icon-non-0-exit.md
This commit is contained in:
parent
7f6d2698c9
commit
97ec422f22
6
.changes/cli-icon-non-0-exit.md
Normal file
6
.changes/cli-icon-non-0-exit.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-cli": "patch:bug"
|
||||
"@tauri-apps/cli": "patch:bug"
|
||||
---
|
||||
|
||||
Exit `tauri icon` with non-zero code when it fails.
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user