Allow specifying base path as system property
This commit is contained in:
parent
8c0019912f
commit
c3de25b125
|
@ -25,10 +25,15 @@ public class MetaHolder {
|
|||
.registerTypeAdapter(ComparableVersion.class, new ComparableVersionAdapter())
|
||||
.create()
|
||||
.fromJson(isr, InceptumVersion.class);
|
||||
Path runDir = getRunDir();
|
||||
BASE_PATH = VERSION.isRelease && !Files.exists(runDir)
|
||||
? getConfigPath().resolve("Inceptum")
|
||||
: runDir;
|
||||
if (System.getProperty("inceptum.base") == null) {
|
||||
Path runDir = getRunDir();
|
||||
BASE_PATH = VERSION.isRelease && !Files.exists(runDir)
|
||||
? getConfigPath().resolve("Inceptum")
|
||||
: runDir;
|
||||
}
|
||||
else {
|
||||
BASE_PATH = Path.of(System.getProperty("inceptum.base"));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Could not get version info", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue