Skip to content

Commit 164bb7e

Browse files
committed
Update pwsh runtimes for linux (#4389)
1 parent d562ad5 commit 164bb7e

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
@@ -97,11 +97,18 @@ private static string config(string @default = null, [CallerMemberName] string k
9797
{
9898
"linux",
9999
"linux-x64",
100-
"linux-arm64",
101100
"unix",
102101
"linux-musl-x64"
103102
};
104103

104+
private static readonly string[] _linARMPowershellRuntimes = new[]
105+
{
106+
"linux",
107+
"linux-arm",
108+
"linux-arm64",
109+
"unix"
110+
};
111+
105112
private static readonly string[] _osxPowershellRuntimes = new[]
106113
{
107114
"osx",
@@ -124,7 +131,7 @@ private static Dictionary<string, string[]> GetPowerShell72Runtimes()
124131
{ "win-x64", _winPowershellRuntimes },
125132
{ "win-arm64", _winPowershellRuntimes },
126133
{ "linux-x64", _linPowershellRuntimes },
127-
{ "linux-arm64", _linPowershellRuntimes },
134+
{ "linux-arm64", _linARMPowershellRuntimes },
128135
{ "osx-x64", _osxPowershellRuntimes },
129136
{ "osx-arm64", _osxARMPowershellRuntimes }
130137
};
@@ -139,7 +146,7 @@ private static Dictionary<string, string[]> GetPowerShell74Runtimes()
139146
{ "win-x64", _winPowershellRuntimesNet8 },
140147
{ "win-arm64", _winPowershellRuntimesNet8 },
141148
{ "linux-x64", _linPowershellRuntimes },
142-
{ "linux-arm64", _linPowershellRuntimes },
149+
{ "linux-arm64", _linARMPowershellRuntimes },
143150
{ "osx-x64", _osxPowershellRuntimes },
144151
{ "osx-arm64", _osxARMPowershellRuntimes }
145152
};
@@ -157,12 +164,12 @@ private static Dictionary<string, string[]> GetPowerShell74Runtimes()
157164
{ "win-x64", _winPowershellRuntimes },
158165
{ "win-arm64", _winPowershellRuntimes },
159166
{ "linux-x64", _linPowershellRuntimes },
160-
{ "linux-arm64", _linPowershellRuntimes },
161167
{ "osx-x64", _osxPowershellRuntimes },
162168
// NOTE: PowerShell 7.0 does not support arm. First version supporting it is 7.2
163169
// https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.2#supported-versions
164170
// 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
165-
{ "osx-arm64", new [] { "osx", "unix" } }
171+
{ "osx-arm64", new [] { "osx", "unix" } },
172+
{ "linux-arm64", new [] { "linux", "unix" } }
166173
}
167174
},
168175
{

0 commit comments

Comments
 (0)