diff --git a/src/System.Management.Automation/engine/SecurityManagerBase.cs b/src/System.Management.Automation/engine/SecurityManagerBase.cs index a9120d27d2..3c7cee9c84 100644 --- a/src/System.Management.Automation/engine/SecurityManagerBase.cs +++ b/src/System.Management.Automation/engine/SecurityManagerBase.cs @@ -90,10 +90,12 @@ namespace System.Management.Automation // 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; } +#endif #if DEBUG diff --git a/src/System.Management.Automation/security/SecuritySupport.cs b/src/System.Management.Automation/security/SecuritySupport.cs index 755b1df4cb..857b7a1119 100644 --- a/src/System.Management.Automation/security/SecuritySupport.cs +++ b/src/System.Management.Automation/security/SecuritySupport.cs @@ -433,11 +433,12 @@ 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 +#if LINUX if (Platform.IsCore) { return true; } - +#endif // Check the file signature Signature fileSignature = SignatureHelper.GetSignature(file, null); if ((fileSignature != null) && (fileSignature.IsOSBinary))