uber-apk-signer
uber-apk-signer copied to clipboard
[feature request] improve error handling when input is not .apk (output/exit code)
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.