@@ -122,13 +122,18 @@ if [ ! -e $__DOTNET_PATH ]; then
122122 __DOTNET_LOCATION=" https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION} /${__DOTNET_PKG} .tar.gz"
123123
124124 install_dotnet_cli () {
125- echo " Installing '${__DOTNET_LOCATION} ' to '$__DOTNET_PATH /dotnet.tar'" >> " $__init_tools_log "
126- rm -rf -- " $__DOTNET_PATH /*"
127- # curl has HTTPS CA trust-issues less often than wget, so lets try that first.
128- if command -v curl > /dev/null; then
129- curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH /dotnet.tar ${__DOTNET_LOCATION}
125+ if [[ " $DotNetBootstrapCliTarPath " = " " ]]; then
126+ echo " Installing '${__DOTNET_LOCATION} ' to '$__DOTNET_PATH /dotnet.tar'"
127+ rm -rf -- " $__DOTNET_PATH /*"
128+ # curl has HTTPS CA trust-issues less often than wget, so lets try that first.
129+ if command -v curl > /dev/null; then
130+ curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH /dotnet.tar ${__DOTNET_LOCATION}
131+ else
132+ wget -q -O $__DOTNET_PATH /dotnet.tar ${__DOTNET_LOCATION}
133+ fi
130134 else
131- wget -q -O $__DOTNET_PATH /dotnet.tar ${__DOTNET_LOCATION}
135+ echo " Copying '$DotNetBootstrapCliTarPath ' to '$__DOTNET_PATH /dotnet.tar'"
136+ cp $DotNetBootstrapCliTarPath $__DOTNET_PATH /dotnet.tar
132137 fi
133138 cd $__DOTNET_PATH
134139 tar -xf $__DOTNET_PATH /dotnet.tar
@@ -157,6 +162,11 @@ echo "Using RID $__ILASM_RID for BuildTools native tools"
157162export ILASMCOMPILER_VERSION=$__ILASM_VERSION
158163export NATIVE_TOOLS_RID=$__ILASM_RID
159164
165+ if [ ! " $DotNetBootstrapCliTarPath " = " " ]; then
166+ # Assume ilasm is not in nuget yet when bootstrapping...
167+ unset ILASMCOMPILER_VERSION
168+ fi
169+
160170echo " Initializing BuildTools..."
161171echo " Running: $__BUILD_TOOLS_PATH /init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR $__PACKAGES_DIR " >> $__init_tools_log
162172
0 commit comments