From b0dbb02b9631d6975b8eb72888590fc024930c53 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Wed, 26 Feb 2020 10:37:03 +0000 Subject: [PATCH] Only tool restore when paket is local tool --- src/PaketChain/Runner.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/PaketChain/Runner.cs b/src/PaketChain/Runner.cs index 978ee10..27a918c 100644 --- a/src/PaketChain/Runner.cs +++ b/src/PaketChain/Runner.cs @@ -70,13 +70,16 @@ private static int Run(RunnerArgs runnerArgs, CancellationToken cancellationToke Console.WriteLine("-----------------------------------------------------"); if (cancellationToken.IsCancellationRequested) return -2; - Console.WriteLine("Running tool restore"); - ConsoleHelper.RunDotNetCommand(rootDir, "tool restore", cancellationToken); - Console.WriteLine("-----------------------------------------------------"); - if (cancellationToken.IsCancellationRequested) return -2; - var (paketPath, toolType) = FileSystem.LocatePaketFilePath(rootDir, cancellationToken); + if (toolType == PaketType.LocalTool) + { + Console.WriteLine("Running tool restore"); + ConsoleHelper.RunDotNetCommand(rootDir, "tool restore", cancellationToken); + Console.WriteLine("-----------------------------------------------------"); + if (cancellationToken.IsCancellationRequested) return -2; + } + if (runnerArgs.UpdateTool) { switch (toolType)