Skip to content

Commit 99faff1

Browse files
authored
Update pwsh runtimes for linux (#4389)
1 parent de9275c commit 99faff1

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

build/Settings.cs

+12-5
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,18 @@ private static string config(string @default = null, [CallerMemberName] string k
9393
{
9494
"linux",
9595
"linux-x64",
96-
"linux-arm64",
9796
"unix",
9897
"linux-musl-x64"
9998
};
10099

100+
private static readonly string[] _linARMPowershellRuntimes = new[]
101+
{
102+
"linux",
103+
"linux-arm",
104+
"linux-arm64",
105+
"unix"
106+
};
107+
101108
private static readonly string[] _osxPowershellRuntimes = new[]
102109
{
103110
"osx",
@@ -120,7 +127,7 @@ private static Dictionary<string, string[]> GetPowerShell72Runtimes()
120127
{ "win-x64", _winPowershellRuntimes },
121128
{ "win-arm64", _winPowershellRuntimes },
122129
{ "linux-x64", _linPowershellRuntimes },
123-
{ "linux-arm64", _linPowershellRuntimes },
130+
{ "linux-arm64", _linARMPowershellRuntimes },
124131
{ "osx-x64", _osxPowershellRuntimes },
125132
{ "osx-arm64", _osxARMPowershellRuntimes }
126133
};
@@ -135,7 +142,7 @@ private static Dictionary<string, string[]> GetPowerShell74Runtimes()
135142
{ "win-x64", _winPowershellRuntimesNet8 },
136143
{ "win-arm64", _winPowershellRuntimesNet8 },
137144
{ "linux-x64", _linPowershellRuntimes },
138-
{ "linux-arm64", _linPowershellRuntimes },
145+
{ "linux-arm64", _linARMPowershellRuntimes },
139146
{ "osx-x64", _osxPowershellRuntimes },
140147
{ "osx-arm64", _osxARMPowershellRuntimes }
141148
};
@@ -153,12 +160,12 @@ private static Dictionary<string, string[]> GetPowerShell74Runtimes()
153160
{ "win-x64", _winPowershellRuntimes },
154161
{ "win-arm64", _winPowershellRuntimes },
155162
{ "linux-x64", _linPowershellRuntimes },
156-
{ "linux-arm64", _linPowershellRuntimes },
157163
{ "osx-x64", _osxPowershellRuntimes },
158164
// NOTE: PowerShell 7.0 does not support arm. First version supporting it is 7.2
159165
// https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.2#supported-versions
160166
// That being said, we might as well include "osx" and "unix" since it'll hardly affect package size and should lead to more accurate error messages
161-
{ "osx-arm64", new [] { "osx", "unix" } }
167+
{ "osx-arm64", new [] { "osx", "unix" } },
168+
{ "linux-arm64", new [] { "linux", "unix" } }
162169
}
163170
},
164171
{

0 commit comments

Comments
 (0)