Fix exit on dynamic auth and overwrite of portable

snapshot
Jonas Letzbor 2022-04-10 16:20:51 +02:00
parent cf4a97ac2c
commit d6095d73f7
2 changed files with 2 additions and 6 deletions

View File

@ -192,8 +192,6 @@ public class InstallConfig {
this.authUsername = basicAuthUser; this.authUsername = basicAuthUser;
this.authPassword = basicAuthPassword; this.authPassword = basicAuthPassword;
this.allowAskForBasicAuth = askForBasicAuth; this.allowAskForBasicAuth = askForBasicAuth;
offline = false;
} }
/** /**
@ -213,8 +211,6 @@ public class InstallConfig {
this.urlEnding = end; this.urlEnding = end;
this.addVersion = true; this.addVersion = true;
this.allowAskForBasicAuth = askForBasicAuth; this.allowAskForBasicAuth = askForBasicAuth;
offline = false;
} }
/** /**

View File

@ -927,7 +927,7 @@ public class Installer {
// check if basic auth is required // check if basic auth is required
if (con.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) { if (con.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
if (conf.authUsername == null || conf.authPassword == null) { if (conf.authUsername == null || conf.authPassword == null) {
if (!askForAuth) { logger.log("e", "Baisc authentication required for downloading the file \"" + serverURL + "\"", ""); System.exit(-1); } if (!askForAuth) { logger.log("e", "Baisc authentication required for downloading the file \"" + serverURL + "\"", ""); error = -40; return null; }
char[] username = conf.authUsername; char[] username = conf.authUsername;
char[] password = conf.authPassword; char[] password = conf.authPassword;