osx for aspnet?

This commit is contained in:
Robert Muehsig
2017-10-08 23:22:20 +02:00
parent b1ad790c41
commit 4903384bd4
2 changed files with 31 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace ElectronNET.CLI
{
@@ -9,7 +10,19 @@ namespace ElectronNET.CLI
{
using (Process cmd = new Process())
{
cmd.StartInfo.FileName = "cmd.exe";
bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
if (isWindows)
{
cmd.StartInfo.FileName = "cmd.exe";
}
else
{
// ToDo: Linux...
cmd.StartInfo.FileName = "bash";
}
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.CreateNoWindow = true;