mirror of https://github.com/2dust/v2rayN
Improve CoreAdminHandler null obj init
parent
7620dac3a0
commit
0b7d728b04
|
@ -29,9 +29,9 @@ public class CoreAdminHandler
|
|||
|
||||
public async Task<Process?> RunProcessAsLinuxSudo(string fileName, CoreInfo coreInfo, string configPath)
|
||||
{
|
||||
Process process = null;
|
||||
var cmdLine = $"{fileName.AppendQuotes()} {string.Format(coreInfo.Arguments, Utils.GetBinConfigPath(configPath).AppendQuotes())}";
|
||||
var shFilePath = await CreateLinuxShellFile(cmdLine, "run_as_sudo.sh");
|
||||
Process? process = null;
|
||||
|
||||
var cmdTask = Cli.Wrap(shFilePath)
|
||||
.WithWorkingDirectory(Utils.GetBinConfigPath())
|
||||
|
@ -51,7 +51,6 @@ public class CoreAdminHandler
|
|||
.WithValidation(CommandResultValidation.None)
|
||||
.ExecuteAsync();
|
||||
|
||||
|
||||
_linuxSudoPid = cmdTask.ProcessId;
|
||||
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue