mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-22 15:04:47 +00:00
osx for aspnet?
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user