Skip to content

Commit

Permalink
refactor: use bool parse as return value
Browse files Browse the repository at this point in the history
  • Loading branch information
BeeHiveJava committed Sep 13, 2020
1 parent cb1af58 commit f009e3f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/DaemonRunner/DaemonRunner/NetDaemonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,7 @@ private static void RegisterNetDaemonAssembly(IServiceCollection services)
private static bool BypassLocalAssemblyLoading()
{
var value = Environment.GetEnvironmentVariable("HASS_DISABLE_LOCAL_ASM");

if (string.IsNullOrWhiteSpace(value))
return false;

if (bool.TryParse(value, out var boolResult))
return boolResult;

return false;
return bool.TryParse(value, out var result) && result;
}
}
}

0 comments on commit f009e3f

Please sign in to comment.