Console Linux sudo read password
This commit is contained in:
@@ -3,8 +3,7 @@ using FileTime.Providers.LocalAdmin;
|
|||||||
namespace FileTime.GuiApp.App.Configuration;
|
namespace FileTime.GuiApp.App.Configuration;
|
||||||
|
|
||||||
public class MainGuiConfiguration
|
public class MainGuiConfiguration
|
||||||
{
|
{
|
||||||
|
|
||||||
public static Dictionary<string, string?> Configuration { get; }
|
public static Dictionary<string, string?> Configuration { get; }
|
||||||
static MainGuiConfiguration()
|
static MainGuiConfiguration()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -162,8 +162,11 @@ public class AdminElevationManager : IAdminElevationManager, INotifyPropertyChan
|
|||||||
{
|
{
|
||||||
StartInfo = new()
|
StartInfo = new()
|
||||||
{
|
{
|
||||||
FileName = _configuration.CurrentValue.LinuxElevationTool,
|
FileName = _configuration.CurrentValue.LinuxElevationTool,
|
||||||
CreateNoWindow = true
|
CreateNoWindow = true,
|
||||||
|
RedirectStandardInput = true,
|
||||||
|
RedirectStandardError = true,
|
||||||
|
RedirectStandardOutput = true
|
||||||
},
|
},
|
||||||
EnableRaisingEvents = true
|
EnableRaisingEvents = true
|
||||||
};
|
};
|
||||||
@@ -179,13 +182,13 @@ public class AdminElevationManager : IAdminElevationManager, INotifyPropertyChan
|
|||||||
private (string fileName, IEnumerable<string> arguments) GetServerPathAndArgs(string portFileName)
|
private (string fileName, IEnumerable<string> arguments) GetServerPathAndArgs(string portFileName)
|
||||||
{
|
{
|
||||||
var selfStart = _configuration.CurrentValue.ServerExecutablePath is null;
|
var selfStart = _configuration.CurrentValue.ServerExecutablePath is null;
|
||||||
|
|
||||||
var fileName = selfStart
|
var fileName = selfStart
|
||||||
? Process.GetCurrentProcess().MainModule?.FileName
|
? Process.GetCurrentProcess().MainModule?.FileName
|
||||||
: _configuration.CurrentValue.ServerExecutablePath;
|
: _configuration.CurrentValue.ServerExecutablePath;
|
||||||
|
|
||||||
if(fileName is null) throw new Exception("Could not get server executable path");
|
if (fileName is null) throw new Exception("Could not get server executable path");
|
||||||
|
|
||||||
IEnumerable<string> arguments = new[]
|
IEnumerable<string> arguments = new[]
|
||||||
{
|
{
|
||||||
"--PortWriter:FileName",
|
"--PortWriter:FileName",
|
||||||
|
|||||||
Reference in New Issue
Block a user