Убраны попытки применить переменные окружения к сессии
This commit is contained in:
@@ -52,7 +52,6 @@ public sealed class LinuxEnvironmentVariableStore : IEnvironmentVariableStore
|
||||
var managed = LoadManagedFile();
|
||||
managed[name] = value;
|
||||
WriteManagedFileAtomic(managed);
|
||||
System.Environment.SetEnvironmentVariable(name, value);
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException or IOException)
|
||||
{
|
||||
@@ -115,8 +114,6 @@ public sealed class LinuxEnvironmentVariableStore : IEnvironmentVariableStore
|
||||
|
||||
WriteConfFileAtomic(file, variables);
|
||||
}
|
||||
|
||||
System.Environment.SetEnvironmentVariable(name, null);
|
||||
}
|
||||
catch (Exception ex) when (ex is UnauthorizedAccessException or IOException)
|
||||
{
|
||||
@@ -126,15 +123,6 @@ public sealed class LinuxEnvironmentVariableStore : IEnvironmentVariableStore
|
||||
}
|
||||
}
|
||||
|
||||
public EnvironmentReloadResult ReloadEnvironment() =>
|
||||
new()
|
||||
{
|
||||
Success = false,
|
||||
Message =
|
||||
"Применение переменных к сессии в Linux не поддерживается. " +
|
||||
"Значения сохраняются в ~/.config/environment.d/ и подхватываются после перезапуска login-сессии.",
|
||||
};
|
||||
|
||||
private Dictionary<string, string> LoadManagedFile()
|
||||
{
|
||||
if (!File.Exists(_managedFilePath))
|
||||
|
||||
Reference in New Issue
Block a user