Open HaleTom opened 6 years ago
@HaleTom the syntax is my.AppImage --appimage-extract
, that will extract my.AppImage
to squashfs-root
. I'm not sure what you're trying to do, please add more details.
Likely my.AppImage --appimage-extract /some/non/extisting.file
Sorry, that wasn't clear. I've updated the top post.
In another place we determined that in case of errors we should print a message but nevertheless continue extracting: https://github.com/AppImage/AppImageKit/issues/834
Keep in mind that --appimage-extract
supports extracting multiple files using wildcards; thus I think this should apply here too. Just exiting with 1 on the first file that fails may be more concise but would also prevent users from extracting files that would otherwise be possible to be extracted.
@probonopd FYI I am aware of #363 and am already working around it.
I agree that exiting 1 immediately is premature, but if any part of the command failed I'd expect a non-0 exit code.
Possibly exit 2 for "a requested file doesn't exist" and exit 1 for IO error or other?
PR highly welcome.
I would expect that trying to extract a file which doesn't exist in the image would exit non-0.
<appimage> --appimage-extract <non-existant-file>
What I get is a null output and a 0 exit code (which by convention means that everything worked OK)
The exit code can be viewed with a POSIX compatible shell via:
echo $?
Likewise I expect a human-readable error message when any of the requested files don't exist in the image.