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.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
@ -24,8 +25,9 @@ namespace WebInterface
|
||||
string supervisor = "Supervisor";
|
||||
if (isWindows)
|
||||
supervisor += ".exe";
|
||||
if (!File.Exists(supervisor))
|
||||
throw new Exception($"Couldn't find {supervisor} in {Directory.GetCurrentDirectory()}");
|
||||
string supervisorPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), supervisor);
|
||||
if (!File.Exists(supervisorPath))
|
||||
throw new Exception($"Couldn't find {supervisor} at {supervisorPath}");
|
||||
Process.Start(supervisor);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user