Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changes/feat-appimage-improved-error-message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"cargo-packager": minor
"@crabnebula/packager": minor
---

Changed the error message when running the AppImage build script fails.
It now includes the full path to the build script.
6 changes: 3 additions & 3 deletions crates/packager/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ pub enum Error {
/// Custom signing command error
#[error("Error running custom signing command: {0}")]
CustomSignCommandFailed(std::io::Error),
/// bundle_appimage script error
#[error("Error running bundle_appimage.sh script: {0}")]
AppImageScriptFailed(std::io::Error),
/// build_appimage script error
#[error("Error running {0} script: {1}")]
AppImageScriptFailed(PathBuf, std::io::Error),
/// Failed to get parent directory of a path
#[error("Failed to get parent directory of {0}")]
ParentDirNotFound(PathBuf),
Expand Down
2 changes: 1 addition & 1 deletion crates/packager/src/package/appimage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
Command::new(&sh_file)
.current_dir(intermediates_path)
.output_ok()
.map_err(crate::Error::AppImageScriptFailed)?;
.map_err(|e| crate::Error::AppImageScriptFailed(sh_file, e))?;

Ok(vec![appimage_path])
}
Loading