Commit 8049b089 authored by topjohnwu's avatar topjohnwu

More precise new installer detection

parent d1fa5be2
...@@ -96,8 +96,14 @@ public class Repo extends BaseModule { ...@@ -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;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment