diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e2a029..238df75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ * Fixed issues with proxy information not getting properly passed through to app. Via [#216](//github.com/threerings/getdown/pull/216). +* `appbase` and `latest` properties in `getdown.txt` now process env var subtitutions. + ## 1.8.4 - May 14, 2019 * Added `verify_timeout` config to allow customization of the default (60 second) timeout during diff --git a/core/src/main/java/com/threerings/getdown/data/Application.java b/core/src/main/java/com/threerings/getdown/data/Application.java index fa132f9..c0125e5 100644 --- a/core/src/main/java/com/threerings/getdown/data/Application.java +++ b/core/src/main/java/com/threerings/getdown/data/Application.java @@ -586,7 +586,7 @@ public class Application throw new RuntimeException("m.missing_appbase"); } - // check if we're overriding the domain in the appbase + // check if we're overriding the domain in the appbase, and sub envvars _appbase = processArg(SysProps.overrideAppbase(_appbase)); // make sure there's a trailing slash @@ -606,8 +606,9 @@ public class Application } // check for a latest config URL - String latest = processArg(config.getString("latest")); + String latest = config.getString("latest"); if (latest != null) { + latest = processArg(latest); if (latest.startsWith(_appbase)) { latest = _appbase + latest.substring(_appbase.length()); } else { @@ -1121,10 +1122,6 @@ public class Application /** Replaces the application directory and version in any argument. */ protected String processArg (String arg) { - if (arg == null) { - return null; - } - arg = arg.replace("%APPDIR%", getAppDir().getAbsolutePath()); arg = arg.replace("%VERSION%", String.valueOf(_version));