Skip to content

Commit

Permalink
Only tool restore when paket is local tool
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Feb 26, 2020
1 parent e8ecd09 commit b0dbb02
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/PaketChain/Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b0dbb02

Please sign in to comment.