From 9a9ff6f7664fc520b7bae9d1c05148f40047a6fe Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 12 Jul 2016 11:27:31 -0700 Subject: [PATCH] Removed language if statement no longer needed due to compiler if statement Clarified comment --- .../engine/SecurityManagerBase.cs | 11 +++++------ .../security/SecuritySupport.cs | 7 ++----- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/System.Management.Automation/engine/SecurityManagerBase.cs b/src/System.Management.Automation/engine/SecurityManagerBase.cs index 3c7cee9c84..5a08746535 100644 --- a/src/System.Management.Automation/engine/SecurityManagerBase.cs +++ b/src/System.Management.Automation/engine/SecurityManagerBase.cs @@ -87,14 +87,13 @@ namespace System.Management.Automation CommandOrigin origin, PSHost host) { +#if LINUX // TODO:PSL this is a workaround since the exception below // hides the internal issue of what's going on in terms of - // execution policy. -#if LINUX - if (Platform.IsCore) - { - return; - } + // execution policy. + // On non-Windows platform Set/Get-ExecutionPolicy return + // Operation is not supported on this platform. + return; #endif diff --git a/src/System.Management.Automation/security/SecuritySupport.cs b/src/System.Management.Automation/security/SecuritySupport.cs index 857b7a1119..4d8b65f840 100644 --- a/src/System.Management.Automation/security/SecuritySupport.cs +++ b/src/System.Management.Automation/security/SecuritySupport.cs @@ -431,13 +431,10 @@ namespace System.Management.Automation return false; } +#if LINUX // There is no signature support on non-Windows platforms (yet), when // execution reaches here, we are sure the file is under product folder -#if LINUX - if (Platform.IsCore) - { - return true; - } + return true; #endif // Check the file signature Signature fileSignature = SignatureHelper.GetSignature(file, null);