mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Implement --no-config-migrate option
This commit is contained in:
@@ -45,6 +45,7 @@ using SteamKit2;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal static class Program {
|
||||
internal static bool ConfigMigrate { get; private set; } = true;
|
||||
internal static bool ConfigWatch { get; private set; } = true;
|
||||
internal static string? NetworkGroup { get; private set; }
|
||||
internal static bool ProcessRequired { get; private set; }
|
||||
@@ -502,6 +503,10 @@ namespace ArchiSteamFarm {
|
||||
case "--network-group" when !cryptKeyNext && !networkGroupNext && !pathNext:
|
||||
networkGroupNext = true;
|
||||
|
||||
break;
|
||||
case "--no-config-migrate" when !cryptKeyNext && !networkGroupNext && !pathNext:
|
||||
ConfigMigrate = false;
|
||||
|
||||
break;
|
||||
case "--no-config-watch" when !cryptKeyNext && !networkGroupNext && !pathNext:
|
||||
ConfigWatch = false;
|
||||
|
||||
@@ -468,6 +468,10 @@ namespace ArchiSteamFarm.Steam.Storage {
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
if (!Program.ConfigMigrate) {
|
||||
return (botConfig, null);
|
||||
}
|
||||
|
||||
botConfig.Saving = true;
|
||||
string latestJson = JsonConvert.SerializeObject(botConfig, Formatting.Indented);
|
||||
botConfig.Saving = false;
|
||||
|
||||
@@ -378,6 +378,10 @@ namespace ArchiSteamFarm.Storage {
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
if (!Program.ConfigMigrate) {
|
||||
return (globalConfig, null);
|
||||
}
|
||||
|
||||
globalConfig.Saving = true;
|
||||
string latestJson = JsonConvert.SerializeObject(globalConfig, Formatting.Indented);
|
||||
globalConfig.Saving = false;
|
||||
|
||||
Reference in New Issue
Block a user