Skip to content

Handle verbosity in extract image for non-returning errors #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2023
Merged
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
8 changes: 6 additions & 2 deletions src/runtime/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,9 @@ bool extract_appimage(const char* const appimage_path, const char* const _prefix
struct stat st;
if (!overwrite && stat(prefixed_path_to_extract, &st) == 0 &&
st.st_size == inode.xtra.reg.file_size) {
// fprintf(stderr, "File exists and file size matches, skipping\n");
if (verbose) {
fprintf(stderr, "File exists and file size matches, skipping\n");
}
continue;
}

Expand Down Expand Up @@ -1410,7 +1412,9 @@ int main(int argc, char* argv[]) {
exit(1);
}

if (!extract_appimage(appimage_path, "squashfs-root/", pattern, true, true)) {
const bool verbose = (getenv("VERBOSE") != NULL);

if (!extract_appimage(appimage_path, "squashfs-root/", pattern, true, verbose)) {
exit(1);
}

Expand Down