Skip to content

Commit d896918

Browse files
authored
Fix fetch-microsoft-sdk script (#1925)
The script internally uses dotnet-install. The output of dotnet-install has changed: it now prints multiple urls and only one of them is the one we want. > dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: > dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. > dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. > dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer. > > dotnet-install: Payload URLs: > dotnet-install: Primary named payload URL: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.110/dotnet-sdk-3.1.110-linux-x64.tar.gz > dotnet-install: Repeatable invocation: ./dotnet-install.sh --version "3.1.110" --install-dir "$HOME/.dotnet" --architecture "x64 " Fix the grep expression to pick up the payload URL.
1 parent b4d00c3 commit d896918

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/fetch-microsoft-sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ else
5454
fi
5555

5656
chmod +x "${install_script}"
57-
url=$("${install_script_dir}/dotnet-install.sh" --dry-run --version "${sdk_version}" | grep https | sed -E 's|.*(https://.*tar.gz)$|\1|' | head -1)
57+
url=$("${install_script_dir}/dotnet-install.sh" --dry-run --version "${sdk_version}" | grep -E 'https://.*tar.gz' | sed -E 's|.*(https://.*tar.gz)$|\1|' | head -1)
5858
echo "${url}"
5959

6060
# Use curl if available, otherwise use wget

0 commit comments

Comments
 (0)