From a5f1d74a8ee3651b09fbc1236164a65cd329abf0 Mon Sep 17 00:00:00 2001
From: Alexa <53471801+Alexa-RR@users.noreply.github.com>
Date: Wed, 27 May 2026 11:53:40 +0300
Subject: [PATCH] launcher: surface env vars even when path is missing on disk
Previously DescribeActive() only returned overrides when the path
resolved, so DORKNET_LOCAL_RELEASES set to a typo'd or unmounted
path would silently fall through to the GitHub fetch and the
Settings panel would stay hidden. Now the panel shows the env
var value with a [SET BUT NOT FOUND on disk] tag when the path
isn't there, so the user can debug 'I set it but it didn't work'
without reading the source.
---
launcher/Backend/LocalOverrides.cs | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/launcher/Backend/LocalOverrides.cs b/launcher/Backend/LocalOverrides.cs
index dd4aa05..b627557 100644
--- a/launcher/Backend/LocalOverrides.cs
+++ b/launcher/Backend/LocalOverrides.cs
@@ -66,15 +66,25 @@ public static class LocalOverrides
return Directory.Exists(dir) ? dir : null;
}
- /// Single-line description of what overrides are active,
- /// for surfacing in the Settings view. Empty string if none.
+ /// Multi-line description of override state, for the
+ /// Settings view. Shows env var values even when the path doesn't
+ /// resolve, so the user can debug "I set DORKNET_LOCAL_RELEASES
+ /// but it didn't work" without digging into File.Exists.
public static string DescribeActive()
{
var parts = new List();
- var m = GetLocalManifestPath();
- if (m is not null) parts.Add($"manifest -> {m}");
- var r = GetLocalReleasesRoot();
- if (r is not null) parts.Add($"releases -> {r}");
+ Describe(ManifestEnvVar, isDir: false, parts);
+ Describe(ReleasesEnvVar, isDir: true, parts);
return string.Join("\n", parts);
}
+
+ private static void Describe(string envVar, bool isDir, List parts)
+ {
+ var raw = Environment.GetEnvironmentVariable(envVar);
+ if (string.IsNullOrEmpty(raw)) return;
+ var exists = isDir ? Directory.Exists(raw) : File.Exists(raw);
+ parts.Add(exists
+ ? $"{envVar} -> {raw} [active]"
+ : $"{envVar} -> {raw} [SET BUT NOT FOUND on disk]");
+ }
}