More precise new installer detection

This commit is contained in:
topjohnwu 2019-03-28 06:33:24 -04:00
parent d1fa5be210
commit 8049b08918

View File

@ -96,8 +96,14 @@ public class Repo extends BaseModule {
} }
public boolean isNewInstaller() { public boolean isNewInstaller() {
try (Request req = Networking.get(getFileUrl("install.sh"))) { try (Request install = Networking.get(getFileUrl("install.sh"))) {
return req.connect().isSuccess(); if (install.connect().isSuccess()) {
// Double check whether config.sh exists
try (Request config = Networking.get(getFileUrl("config.sh"))) {
return !config.connect().isSuccess();
}
}
return false;
} }
} }