mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Separate DSC configuration parser check for ARM processor (#21395)
This commit is contained in:
@@ -2984,8 +2984,8 @@ namespace System.Management.Automation.Language
|
||||
Runspaces.Runspace.DefaultRunspace = localRunspace;
|
||||
}
|
||||
|
||||
// Configuration is not supported on ARM or in ConstrainedLanguage
|
||||
if (PsUtils.IsRunningOnProcessorArchitectureARM() || Runspace.DefaultRunspace?.ExecutionContext?.LanguageMode == PSLanguageMode.ConstrainedLanguage)
|
||||
// Configuration is not supported in ConstrainedLanguage
|
||||
if (Runspace.DefaultRunspace?.ExecutionContext?.LanguageMode == PSLanguageMode.ConstrainedLanguage)
|
||||
{
|
||||
if (SystemPolicy.GetSystemLockdownPolicy() != SystemEnforcementMode.Audit)
|
||||
{
|
||||
@@ -3004,6 +3004,17 @@ namespace System.Management.Automation.Language
|
||||
dropIntoDebugger: true);
|
||||
}
|
||||
|
||||
// Configuration is not supported on ARM64
|
||||
if (PsUtils.IsRunningOnProcessorArchitectureARM())
|
||||
{
|
||||
ReportError(
|
||||
configurationToken.Extent,
|
||||
nameof(ParserStrings.ConfigurationNotAllowedOnArm64),
|
||||
ParserStrings.ConfigurationNotAllowedOnArm64,
|
||||
configurationToken.Kind.Text());
|
||||
return null;
|
||||
}
|
||||
|
||||
// Configuration is not supported on WinPE
|
||||
if (Utils.IsWinPEHost())
|
||||
{
|
||||
|
||||
@@ -1370,4 +1370,7 @@ ModuleVersion : Version of module to import. If used, ModuleName must represent
|
||||
<data name="WDACGetSteppablePipelineLogMessage" xml:space="preserve">
|
||||
<value>Creating a steppable pipeline from a script block may require evaluating some expressions within the script block. The expression evaluation will silently fail and return 'null' in Constrained Language mode, unless the expression represents a constant value.</value>
|
||||
</data>
|
||||
<data name="ConfigurationNotAllowedOnArm64" xml:space="preserve">
|
||||
<value>Configuration keyword is not supported on ARM64 processors.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
Reference in New Issue
Block a user