Refine IsAutoUpdateAllowed: group in (), invert, rename v to env, only accept false

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/DiscordChatExporter/sessions/1467eee2-3069-4f0b-abdf-b1dc65e00a9a
This commit is contained in:
copilot-swe-agent[bot] 2026-03-21 18:16:22 +00:00
parent 2a291b0dff
commit a01d0ff2ae

View File

@ -22,9 +22,10 @@ public partial class StartOptions
? Path.Combine(path, "Settings.dat")
: path
: Path.Combine(AppContext.BaseDirectory, "Settings.dat"),
IsAutoUpdateAllowed =
Environment.GetEnvironmentVariable("DISCORDCHATEXPORTER_ALLOW_AUTO_UPDATE") is not
{ } v
|| !(v == "0" || v.Equals("false", StringComparison.OrdinalIgnoreCase)),
IsAutoUpdateAllowed = !(
Environment.GetEnvironmentVariable("DISCORDCHATEXPORTER_ALLOW_AUTO_UPDATE") is
{ } env
&& env.Equals("false", StringComparison.OrdinalIgnoreCase)
),
};
}