Skip to content

Commit 567f17b

Browse files
Marc Jakobimrcjkb
authored andcommitted
feat(appimage)!: more useful error message
feat(appimage)!: more useful error message
1 parent c145e8b commit 567f17b

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"cargo-packager": minor
3+
"@crabnebula/packager": minor
4+
---
5+
6+
Changed the error message when running the AppImage build script fails.
7+
It now includes the full path to the build script.

crates/packager/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ pub enum Error {
9595
/// Custom signing command error
9696
#[error("Error running custom signing command: {0}")]
9797
CustomSignCommandFailed(std::io::Error),
98-
/// bundle_appimage script error
99-
#[error("Error running bundle_appimage.sh script: {0}")]
100-
AppImageScriptFailed(std::io::Error),
98+
/// build_appimage script error
99+
#[error("Error running {0} script: {1}")]
100+
AppImageScriptFailed(PathBuf, std::io::Error),
101101
/// Failed to get parent directory of a path
102102
#[error("Failed to get parent directory of {0}")]
103103
ParentDirNotFound(PathBuf),

crates/packager/src/package/appimage/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
208208
Command::new(&sh_file)
209209
.current_dir(intermediates_path)
210210
.output_ok()
211-
.map_err(crate::Error::AppImageScriptFailed)?;
211+
.map_err(|e| crate::Error::AppImageScriptFailed(sh_file, e))?;
212212

213213
Ok(vec![appimage_path])
214214
}

0 commit comments

Comments
 (0)