mirror of
https://github.com/CommonLoon102/NBloodServerSupervisor.git
synced 2025-01-03 08:32:45 +01:00
fix supervisor location
This commit is contained in:
parent
496ad6629b
commit
df689c5d68
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
@ -24,8 +25,9 @@ namespace WebInterface
|
|||||||
string supervisor = "Supervisor";
|
string supervisor = "Supervisor";
|
||||||
if (isWindows)
|
if (isWindows)
|
||||||
supervisor += ".exe";
|
supervisor += ".exe";
|
||||||
if (!File.Exists(supervisor))
|
string supervisorPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), supervisor);
|
||||||
throw new Exception($"Couldn't find {supervisor} in {Directory.GetCurrentDirectory()}");
|
if (!File.Exists(supervisorPath))
|
||||||
|
throw new Exception($"Couldn't find {supervisor} at {supervisorPath}");
|
||||||
Process.Start(supervisor);
|
Process.Start(supervisor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user