From 5168b35c67cf078fa241bf68778ae416ef7fddf7 Mon Sep 17 00:00:00 2001 From: Francisco-Gamino Date: Fri, 17 Jun 2022 19:40:30 -0700 Subject: [PATCH] Install the required version of grpc tools if needed --- tools/helper.psm1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/helper.psm1 b/tools/helper.psm1 index cfd8b98e..2d967241 100644 --- a/tools/helper.psm1 +++ b/tools/helper.psm1 @@ -119,7 +119,8 @@ function Resolve-ProtoBufToolPath $nugetPath = Get-NugetPackagesPath $toolsPath = "$RepoRoot/tools" - if (-not (Test-Path "$toolsPath/obj/project.assets.json")) { + if (-not (Test-Path "$toolsPath/obj/project.assets.json") -or + -not (Test-Path "$nugetPath/grpc.tools/$GrpcToolsVersion")) { dotnet restore $toolsPath --verbosity quiet if ($LASTEXITCODE -ne 0) { throw "Cannot resolve protobuf tools. 'dotnet restore $toolsPath' failed."