mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-04 02:00:11 +02:00
init: fix init with Debian Android SDK packages
If the auto-detected SDK path passes test_sdk_exists(), then just use it without prompting. fixes !821
This commit is contained in:
parent
85fa53008c
commit
767573f2ec
@ -94,7 +94,10 @@ def main():
|
|||||||
p = '/opt/android-sdk'
|
p = '/opt/android-sdk'
|
||||||
if os.path.exists(p):
|
if os.path.exists(p):
|
||||||
default_sdk_path = p
|
default_sdk_path = p
|
||||||
|
test_config['sdk_path'] = default_sdk_path
|
||||||
|
|
||||||
|
if not common.test_sdk_exists(test_config):
|
||||||
|
del(test_config['sdk_path'])
|
||||||
while not options.no_prompt:
|
while not options.no_prompt:
|
||||||
try:
|
try:
|
||||||
s = input(_('Enter the path to the Android SDK (%s) here:\n> ') % default_sdk_path)
|
s = input(_('Enter the path to the Android SDK (%s) here:\n> ') % default_sdk_path)
|
||||||
@ -105,11 +108,9 @@ def main():
|
|||||||
test_config['sdk_path'] = default_sdk_path
|
test_config['sdk_path'] = default_sdk_path
|
||||||
else:
|
else:
|
||||||
test_config['sdk_path'] = s
|
test_config['sdk_path'] = s
|
||||||
if not default_sdk_path:
|
|
||||||
del(test_config['sdk_path'])
|
|
||||||
break
|
|
||||||
if common.test_sdk_exists(test_config):
|
if common.test_sdk_exists(test_config):
|
||||||
break
|
break
|
||||||
|
default_sdk_path = ''
|
||||||
|
|
||||||
if test_config.get('sdk_path') and not common.test_sdk_exists(test_config):
|
if test_config.get('sdk_path') and not common.test_sdk_exists(test_config):
|
||||||
raise FDroidException(_("Android SDK not found at {path}!")
|
raise FDroidException(_("Android SDK not found at {path}!")
|
||||||
|
Loading…
Reference in New Issue
Block a user