Skip to content
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

[feature request] improve error handling when input is not .apk (output/exit code) #36

Open
ghost opened this issue Apr 9, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 9, 2022

I often sign zip, jars etc..
kind of feeded a zip to a batch file using uber-apk-signer,
and got

provided apk path or file 'D:\sample.zip' does not exist
java.lang.IllegalArgumentException: provided apk path or file 'D:\sample.zip' does not exist
        at at.favre.tools.apksigner.ui.FileArgParser.parseAndSortUniqueFilesNonRecursive(FileArgParser.java:38)
        at at.favre.tools.apksigner.SignTool.execute(SignTool.java:60)
        at at.favre.tools.apksigner.SignTool.mainExecute(SignTool.java:45)
        at at.favre.tools.apksigner.SignTool.main(SignTool.java:33)

Cmd history for debugging purpose:
-----------------------

(exit code 1).

tries multiple variations of the arguments (including normalizing paths from backslash to forward slash),
until I've changed the extension to APK.

obviously it makes sense that u.a.s. only handles apk files (it's in the name..).

it seems like an exception that wasn't caught and thrown up until it got the the file-path exception handling method.

I personally transitioned from jarsigner, to apksigner (both can handle ZIP-DEFLATE),
to u.a.s., and a nice message (or even a meaningful exit code) would help a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants