diff --git a/src/Ombi/Program.cs b/src/Ombi/Program.cs index 60f287a16..9caa657b5 100644 --- a/src/Ombi/Program.cs +++ b/src/Ombi/Program.cs @@ -251,12 +251,12 @@ namespace Ombi if (setBaseUrl) { var trimmedBaseUrl = baseUrl.EndsWith('/') ? baseUrl.TrimEnd('/') : baseUrl; - var process = Process.GetCurrentProcess().MainModule.FileName; + var process = AppContext.BaseDirectory; var ombiInstalledDir = Path.GetDirectoryName(process); var indexPath = Path.Combine(ombiInstalledDir, "ClientApp", "dist", "index.html"); if (!File.Exists(indexPath)) { - var error = $"Can't set the base URL because we cannot find the file at {indexPath}, if you are trying to set a base url please report this on Github!"; + var error = $"Can't set the base URL because we cannot find the file at '{indexPath}', if you are trying to set a base url please report this on Github!"; Console.WriteLine(error); throw new Exception(error); }