From 31da584f75a0052d5284b4b657fe6e990462c5e2 Mon Sep 17 00:00:00 2001 From: Archi Date: Sat, 4 Dec 2021 13:38:00 +0100 Subject: [PATCH] Relax root warning Even though the case is justified, we shouldn't render whole setups unsupported because of that, as running as root, while discouraged, does not directly affect the program stability. This is especially true on Windows boxes where there is a lot of setups running with administrators by default and users are not even aware of that, I don't have a good fix for them (apart from reinstallation), and because I do not, I should not expect from them to supply cmd-line arg they don't even understand why. --- ArchiSteamFarm/Localization/Strings.resx | 2 +- ArchiSteamFarm/Program.cs | 6 ++---- Directory.Build.props | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ArchiSteamFarm/Localization/Strings.resx b/ArchiSteamFarm/Localization/Strings.resx index 2ddde77e4..ed6977a04 100644 --- a/ArchiSteamFarm/Localization/Strings.resx +++ b/ArchiSteamFarm/Localization/Strings.resx @@ -720,7 +720,7 @@ Process uptime: {1} {0} will be replaced by the name of a particular setting (e.g. "AES"), {1} will be replaced by the name of the property (e.g. "SteamPassword") - You're attempting to run ASF as the administrator (root). This causes a significant security risk to your machine, and as ASF does not require root access for its operation, we do not support this scenario. Supply --ignore-unsupported-environment argument if you really know what you're doing. + You're attempting to run ASF as the administrator (root). This causes a significant security risk to your machine, and as ASF does not require root access for its operation, we recommend to run it as non-administrator user if possible. You're running ASF in unsupported environment, supplying --ignore-unsupported-environment argument. Please note that we do not offer any kind of support for this scenario and you're doing it entirely at your own risk. You've been warned. diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 80e7053dd..8e2d8c52b 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -271,10 +271,8 @@ internal static class Program { } if (OS.IsRunningAsRoot()) { - ASF.ArchiLogger.LogGenericError(Strings.WarningRunningAsRoot); - await Task.Delay(SharedInfo.InformationDelay).ConfigureAwait(false); - - return false; + ASF.ArchiLogger.LogGenericWarning(Strings.WarningRunningAsRoot); + await Task.Delay(SharedInfo.ShortInformationDelay).ConfigureAwait(false); } } diff --git a/Directory.Build.props b/Directory.Build.props index 31a3b1769..bf75e0e1d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 5.2.0.9 + 5.2.0.10