From 75cb523e7db2908fdb13eab469701aca6d5860b7 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 9 Feb 2020 12:11:02 -0400 Subject: [PATCH] restoring global tools as part of build --- build.ps1 | 7 +++++++ build.sh | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 9826e3b2f6..c9d1cbf897 100644 --- a/build.ps1 +++ b/build.ps1 @@ -103,6 +103,13 @@ $Arguments = @{ dryrun=$WhatIf; }.GetEnumerator() | %{"--{0}=`"{1}`"" -f $_.key, $_.value }; +Write-Host "Restoring global tools..." +Invoke-Expression "dotnet tool restore" +if($LASTEXITCODE -ne 0) { + Pop-Location; + exit $LASTEXITCODE; +} + # Start Cake Push-Location Set-Location build diff --git a/build.sh b/build.sh index db1aeb14a7..4393a1eed8 100755 --- a/build.sh +++ b/build.sh @@ -6,10 +6,13 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then echo "new limit: `ulimit -n`" fi +echo "Restoring global tools" +dotnet tool restore + cd build echo "Preparing Cake.Frosting build runner..." dotnet restore echo "Executing Cake.Frosting build runner..." echo "dotnet run -- $@" -dotnet run -- "$@" \ No newline at end of file +dotnet run -- "$@"