From dc632bff96be26f438aa5946e2ecff05be9dc2cc Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 12 Jul 2016 12:11:07 -0700 Subject: [PATCH] Fixed unreachable code issue --- src/System.Management.Automation/engine/SecurityManagerBase.cs | 3 ++- src/System.Management.Automation/security/SecuritySupport.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/System.Management.Automation/engine/SecurityManagerBase.cs b/src/System.Management.Automation/engine/SecurityManagerBase.cs index 5a08746535..548bd737be 100644 --- a/src/System.Management.Automation/engine/SecurityManagerBase.cs +++ b/src/System.Management.Automation/engine/SecurityManagerBase.cs @@ -94,7 +94,7 @@ namespace System.Management.Automation // On non-Windows platform Set/Get-ExecutionPolicy return // Operation is not supported on this platform. return; -#endif +#else #if DEBUG @@ -160,6 +160,7 @@ namespace System.Management.Automation throw new PSSecurityException(AuthorizationManagerBase.AuthorizationManagerDefaultFailureReason); } } +#endif } /// diff --git a/src/System.Management.Automation/security/SecuritySupport.cs b/src/System.Management.Automation/security/SecuritySupport.cs index 4d8b65f840..05ae9f77dc 100644 --- a/src/System.Management.Automation/security/SecuritySupport.cs +++ b/src/System.Management.Automation/security/SecuritySupport.cs @@ -435,7 +435,7 @@ namespace System.Management.Automation // There is no signature support on non-Windows platforms (yet), when // execution reaches here, we are sure the file is under product folder return true; -#endif +#else // Check the file signature Signature fileSignature = SignatureHelper.GetSignature(file, null); if ((fileSignature != null) && (fileSignature.IsOSBinary)) @@ -455,6 +455,7 @@ namespace System.Management.Automation } return false; +#endif } #if !CORECLR