mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-21 17:54:37 -05:00
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:
parent
2a291b0dff
commit
a01d0ff2ae
|
|
@ -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)
|
||||
),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user