Skip to content

Commit dfbf3bf

Browse files
committed
Fix for correct dev environmet not loading
1 parent a6e6b86 commit dfbf3bf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/DaemonRunner/DaemonRunner/Service/App/DaemonCompiler.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@ public static (IEnumerable<Type>, CollectibleAssemblyLoadContext?) GetDaemonApps
3939

4040
// Load the internal apps (mainly for )
4141
var disableLoadLocalAssemblies = Environment.GetEnvironmentVariable("HASS_DISABLE_LOCAL_ASM");
42-
if (disableLoadLocalAssemblies is object && disableLoadLocalAssemblies == "true")
42+
if (!(disableLoadLocalAssemblies is object && disableLoadLocalAssemblies == "true"))
4343
{
4444
var localApps = LoadLocalAssemblyApplicationsForDevelopment();
4545
if (localApps is object)
4646
loadedApps.AddRange(localApps);
4747
}
48-
48+
if (loadedApps.Count() > 0)
49+
{
50+
// We do not want to get and compile the apps if it is includer
51+
// this is typically when in dev environment
52+
logger.LogInformation("Loading compiled built-in apps");
53+
return (loadedApps, null);
54+
}
4955
CollectibleAssemblyLoadContext alc;
5056
// Load the compiled apps
5157
var (compiledApps, compileErrorText) = GetCompiledApps(out alc, codeFolder, logger);

0 commit comments

Comments
 (0)