Skip to content

Commit 5961f42

Browse files
authored
re-add RunNode
1 parent aaed5d5 commit 5961f42

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,21 @@ public Task<ProcessResult> GetGitOutput(ProcessArgs args, string? workingDirecto
377377
return ProcessRunner.RunBashCommand(args.Prepend("git"), workingDirectory ?? "");
378378
}
379379

380+
private async Task<string> RunNode(
381+
ProcessArgs args,
382+
string? workingDirectory = null,
383+
IReadOnlyDictionary<string, string>? envVars = null
384+
)
385+
{
386+
var nodePath = Path.Combine(NodeDir, "bin", "node");
387+
var result = await ProcessRunner
388+
.GetProcessResultAsync(nodePath, args, workingDirectory, envVars)
389+
.ConfigureAwait(false);
390+
391+
result.EnsureSuccessExitCode();
392+
return result.StandardOutput ?? result.StandardError ?? string.Empty;
393+
}
394+
380395
[Localizable(false)]
381396
[SupportedOSPlatform("Linux")]
382397
[SupportedOSPlatform("macOS")]

0 commit comments

Comments
 (0)