mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Removed conflicting criteria from IsProduction check.
This commit is contained in:
parent
a72b856fb8
commit
a0b4d3a38d
@ -22,13 +22,13 @@ public RuntimeInfoBase(IServiceProvider serviceProvider, Logger logger)
|
|||||||
serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME) &&
|
serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME) &&
|
||||||
serviceProvider.GetStatus(ServiceProvider.NZBDRONE_SERVICE_NAME) == ServiceControllerStatus.StartPending;
|
serviceProvider.GetStatus(ServiceProvider.NZBDRONE_SERVICE_NAME) == ServiceControllerStatus.StartPending;
|
||||||
|
|
||||||
//Guarded to avoid issues when running in a non-managed process
|
//Guarded to avoid issues when running in a non-managed process
|
||||||
var entry = Assembly.GetEntryAssembly();
|
var entry = Assembly.GetEntryAssembly();
|
||||||
|
|
||||||
if (entry != null)
|
if (entry != null)
|
||||||
{
|
{
|
||||||
ExecutingApplication = entry.Location;
|
ExecutingApplication = entry.Location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static RuntimeInfoBase()
|
static RuntimeInfoBase()
|
||||||
@ -69,7 +69,7 @@ public bool IsAdmin
|
|||||||
public bool IsWindowsService { get; private set; }
|
public bool IsWindowsService { get; private set; }
|
||||||
|
|
||||||
public bool IsConsole
|
public bool IsConsole
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (OsInfo.IsWindows)
|
if (OsInfo.IsWindows)
|
||||||
@ -78,7 +78,7 @@ public bool IsConsole
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsRunning { get; set; }
|
public bool IsRunning { get; set; }
|
||||||
@ -105,7 +105,7 @@ private static bool InternalIsProduction()
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -115,15 +115,14 @@ private static bool InternalIsProduction()
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string lowerCurrentDir = Directory.GetCurrentDirectory().ToLower();
|
string lowerCurrentDir = Directory.GetCurrentDirectory().ToLower();
|
||||||
if (lowerCurrentDir.Contains("teamcity")) return false;
|
if (lowerCurrentDir.Contains("teamcity")) return false;
|
||||||
if (lowerCurrentDir.Contains("_output")) return false;
|
if (lowerCurrentDir.Contains("_output")) return false;
|
||||||
if (lowerCurrentDir.StartsWith("/run/")) return false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user