mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-31 17:43:04 -06: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.Combine(path, "Settings.dat")
|
||||||
: path
|
: path
|
||||||
: Path.Combine(AppContext.BaseDirectory, "Settings.dat"),
|
: Path.Combine(AppContext.BaseDirectory, "Settings.dat"),
|
||||||
IsAutoUpdateAllowed =
|
IsAutoUpdateAllowed = !(
|
||||||
Environment.GetEnvironmentVariable("DISCORDCHATEXPORTER_ALLOW_AUTO_UPDATE") is not
|
Environment.GetEnvironmentVariable("DISCORDCHATEXPORTER_ALLOW_AUTO_UPDATE") is
|
||||||
{ } v
|
{ } env
|
||||||
|| !(v == "0" || v.Equals("false", StringComparison.OrdinalIgnoreCase)),
|
&& env.Equals("false", StringComparison.OrdinalIgnoreCase)
|
||||||
|
),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue