Skip to content

Commit 4e24f7d

Browse files
committed
Update AppLifecycleHelper.cs
1 parent d4eee43 commit 4e24f7d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/Files.App/Helpers/Application/AppLifecycleHelper.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ public static class AppLifecycleHelper
2929
/// <summary>
3030
/// Gets the value that provides application environment or branch name.
3131
/// </summary>
32-
public static AppEnvironment AppEnvironment { get; } =
33-
#if DEBUG
34-
AppEnvironment.Dev;
35-
#else
36-
AppEnvironment.cd_app_env_placeholder;
37-
#endif
32+
public static AppEnvironment AppEnvironment
33+
{
34+
get
35+
{
36+
if (Enum.TryParse("cd_app_env_placeholder", true, out AppEnvironment appEnvironment))
37+
return appEnvironment;
38+
else
39+
return AppEnvironment.Dev;
40+
}
41+
}
3842

3943
/// <summary>
4044
/// Gets application package version.

0 commit comments

Comments
 (0)