From c85ed70f25d216b36e79742c17e99f3b6ccc4ce2 Mon Sep 17 00:00:00 2001 From: Francisco Gomez Gamino Date: Mon, 15 Mar 2021 19:51:11 -0700 Subject: [PATCH 1/2] Update nuget packages path --- tools/helper.psm1 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/helper.psm1 b/tools/helper.psm1 index 577c99c8..0348f151 100644 --- a/tools/helper.psm1 +++ b/tools/helper.psm1 @@ -131,7 +131,7 @@ function Resolve-ProtoBufToolPath { if (-not $Script:protoc_Path) { Write-Log "Resolve the protobuf tools for auto-generating code" - $nugetPath = "~/.nuget/packages" + $nugetPath = Get-NugetPackagesPath $toolsPath = "$RepoRoot/tools" if (-not (Test-Path "$toolsPath/obj/project.assets.json")) { @@ -205,6 +205,23 @@ function Write-Log Write-Host -ForegroundColor $foregroundColor "${indentPrefix}${Message}" } +function Get-NugetPackagesPath +{ + if ($env:NUGET_PACKAGES) + { + return $env:NUGET_PACKAGES + } + + if ($IsWindowsEnv) + { + return "${env:USERPROFILE}\.nuget\packages" + } + else + { + return "${env:HOME}/.nuget/packages" + } +} + #region Start-ResGen $generated_code_template = @' From 307f5114231325ae82986b01fc3aaede8197ab81 Mon Sep 17 00:00:00 2001 From: Francisco Gomez Gamino Date: Fri, 2 Apr 2021 11:25:58 -0700 Subject: [PATCH 2/2] Update AspNetVNext value from https://dotnet.myget.org/ to https://www.myget.org/ --- NuGet.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.config b/NuGet.config index 1c667bc1..7ee14b0c 100644 --- a/NuGet.config +++ b/NuGet.config @@ -5,6 +5,6 @@ - +