Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 9c73cba

Browse files
committed
Merge pull request #2115 from josteink/freebsd-nuget-restore
Fix NuGet.exe package restore on systems where wget fails
2 parents dfe8f72 + 57dc0ab commit 9c73cba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ if [ ! -e "$__nugetpath" ]; then
5050
fi
5151
echo "Restoring NuGet.exe..."
5252

53-
which wget > /dev/null 2> /dev/null
53+
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
54+
which curl > /dev/null 2> /dev/null
5455
if [ $? -ne 0 ]; then
55-
curl -sSL --create-dirs -o $__nugetpath https://api.nuget.org/downloads/nuget.exe
56-
else
5756
mkdir -p $__packageroot
5857
wget -q -O $__nugetpath https://api.nuget.org/downloads/nuget.exe
58+
else
59+
curl -sSL --create-dirs -o $__nugetpath https://api.nuget.org/downloads/nuget.exe
5960
fi
6061

6162
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)