diff --git a/fdroidserver/init.py b/fdroidserver/init.py index 390a7c7d..bf4a05fa 100644 --- a/fdroidserver/init.py +++ b/fdroidserver/init.py @@ -105,6 +105,8 @@ def main(): help="Alias of the repo signing key in the keystore") parser.add_option("--android-home", default=None, help="Path to the Android SDK (sometimes set in ANDROID_HOME)") + parser.add_option("--no-prompt", action="store_true", default=False, + help="Do not prompt for Android SDK path, just fail") (options, args) = parser.parse_args() # find root install prefix @@ -127,7 +129,7 @@ def main(): elif not common.test_sdk_exists(test_config): # if neither --android-home nor the default sdk_path exist, prompt the user default_sdk_path = '/opt/android-sdk' - while True: + while not options.no_prompt: s = raw_input('Enter the path to the Android SDK (' + default_sdk_path + ') here:\n> ') if re.match('^\s*$', s) != None: test_config['sdk_path'] = default_sdk_path diff --git a/tests/run-tests b/tests/run-tests index b4ff47f6..2d0ad5cd 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -104,7 +104,7 @@ STORED_ANDROID_HOME=$ANDROID_HOME unset ANDROID_HOME echo "ANDROID_HOME: $ANDROID_HOME" cd $REPOROOT -$fdroid init --keystore $KEYSTORE --android-home $FAKE_ANDROID_HOME +$fdroid init --keystore $KEYSTORE --android-home $FAKE_ANDROID_HOME --no-prompt test -e $KEYSTORE copy_apks_into_repo $REPOROOT $fdroid update -c