Problem
When using the action with a keystore alias value that contains spaces (for example, 'Alias Space'), the generated command does not wrap the alias argument in quotes:
if sign_option == 'SIGN_ON_APPDOME':
keystore_alias = f"--keystore_alias {args.keystore_alias}" if args.keystore_alias != "None" else ""
This results in the shell splitting the alias into multiple arguments, which causes Python's argparse to fail with an error such as:
Namespace(sign_option='SIGN_ON_APPDOME', appdome_api_key='***', fusion_set='***', keystore_pass='***', certificate_pass='None', keystore_alias='Alias Space', keystore_key_pass='***', team_id='***', google_play_signing='false', signing_fingerprint='None', build_with_logs='true', sign_second_output='false', build_to_test='None', output_name='None', firebase_app_id='None', datadog_api_key='None')
entered validate
running command: appdome_virtual_env/bin/python3 appdome/appdome-api-python/appdome_api.py -key *** --app ./files/vanilla_app.apk --sign_on_appdome -fs *** --team_id *** --keystore ./files/cert.keystore --keystore_pass *** --output ./output/Appdome_secured_app.apk --certificate_output ./output/certificate.pdf --keystore_alias Alias Space --key_pass *** -bl --deobfuscation_script_output ./output/deobfuscation_scripts.zip
usage: appdome_api.py [-h] (-a application_file | --app_id app_id_value)
...
appdome_api.py: error: unrecognized arguments: Space
Traceback (most recent call last):
File "/Users/runner/work/MiMonteAppMAUI/MiMonteAppMAUI/./actions/actions/appdome_build_sign.py", line 196, in <module>
main()
Suggestion
Please update the code so that the keystore alias argument is wrapped in quotes when building the command, for example:
keystore_alias = f'--keystore_alias "{args.keystore_alias}"' if args.keystore_alias != "None" else ""
Or use single quotes as appropriate for your shell.
Benefit
This will allow users to specify keystore alias values that include spaces without encountering errors.
Thank you!
Problem
When using the action with a keystore alias value that contains spaces (for example,
'Alias Space'), the generated command does not wrap the alias argument in quotes:This results in the shell splitting the alias into multiple arguments, which causes Python's argparse to fail with an error such as:
Suggestion
Please update the code so that the keystore alias argument is wrapped in quotes when building the command, for example:
Or use single quotes as appropriate for your shell.
Benefit
This will allow users to specify keystore alias values that include spaces without encountering errors.
Thank you!