From 8777de5c8d065d663c86ed4fbd42164284a7b551 Mon Sep 17 00:00:00 2001 From: dantraMSFT Date: Wed, 4 May 2016 13:33:59 -0700 Subject: [PATCH] Change NUGET_PACKAGES env setting to be conditioned on IsWindows --- PowerShellGitHubDev.psm1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PowerShellGitHubDev.psm1 b/PowerShellGitHubDev.psm1 index ceec9d21f7..3dde4e7468 100644 --- a/PowerShellGitHubDev.psm1 +++ b/PowerShellGitHubDev.psm1 @@ -66,10 +66,12 @@ function Start-PSBuild { } } - # use custom package store - this value is also defined in nuget.config under config/repositoryPath - # dotnet restore uses this value as the target for installing the assemblies for referenced nuget packages. - # dotnet build does not currently consume the config value but will consume env:NUGET_PACKAGES to resolve these dependencies - $env:NUGET_PACKAGES="$PSScriptRoot\Packages" + if ($IsWindows) { + # use custom package store - this value is also defined in nuget.config under config/repositoryPath + # dotnet restore uses this value as the target for installing the assemblies for referenced nuget packages. + # dotnet build does not currently consume the config value but will consume env:NUGET_PACKAGES to resolve these dependencies + $env:NUGET_PACKAGES="$PSScriptRoot\Packages" + } # verify we have all tools in place to do the build $precheck = precheck 'dotnet' "Build dependency 'dotnet' not found in PATH! See: https://dotnet.github.io/getting-started/"