Skip to content

Commit

Permalink
Hnadle verbosity in extract_appimage for non-returning errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aoxolotl authored Sep 2, 2023
1 parent 701b711 commit 5994b65
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ bool extract_appimage(const char* const appimage_path, const char* const _prefix
} else {
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 @@ -656,7 +658,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

0 comments on commit 5994b65

Please sign in to comment.