diff options
| author | Stefan Boberg <[email protected]> | 2026-04-02 17:31:56 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2026-04-02 17:31:56 +0200 |
| commit | e490bfe7b9c0f2986065a12281d29e5ab2e452f1 (patch) | |
| tree | 8b3bef1b0bc036675084e0060c1a6b8785ce429d /src/zenserver | |
| parent | add [[nodiscard]] (diff) | |
| download | zen-sb/compute-oidc-auth.tar.xz zen-sb/compute-oidc-auth.zip | |
Expand environment variables in --data-dir and improve HordeAgentsb/compute-oidc-auth
- Add ExpandEnvironmentVariables() to zencore that substitutes %VAR%
references using GetEnvVariable(), leaving unknown vars unexpanded
- Expand env vars in --data-dir before resolving the absolute path
- Use %UE_HORDE_SHARED_DIR%\zen as default data-dir for Horde agents
- Store exit code and exception info on HordeAgent for caller access
- Take HordeConfig by value in HordeClient constructor
Diffstat (limited to 'src/zenserver')
| -rw-r--r-- | src/zenserver/config/config.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/zenserver/config/config.cpp b/src/zenserver/config/config.cpp index daad154bc..58e0df516 100644 --- a/src/zenserver/config/config.cpp +++ b/src/zenserver/config/config.cpp @@ -12,6 +12,7 @@ #include <zencore/compactbinaryutil.h> #include <zencore/compactbinaryvalidation.h> #include <zencore/except.h> +#include <zencore/filesystem.h> #include <zencore/fmtutils.h> #include <zencore/iobuffer.h> #include <zencore/logging.h> @@ -479,6 +480,7 @@ ZenServerCmdLineOptions::ApplyOptions(cxxopts::Options& options, ZenServerConfig } ServerOptions.SystemRootDir = MakeSafeAbsolutePath(SystemRootDir); + DataDir = ExpandEnvironmentVariables(DataDir); ServerOptions.DataDir = MakeSafeAbsolutePath(DataDir); ServerOptions.ContentDir = MakeSafeAbsolutePath(ContentDir); ServerOptions.ConfigFile = MakeSafeAbsolutePath(ConfigFile); |