Skip to content

Commit

Permalink
Fix build script to not throw if tools are already installed (#123)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Stannard <aaron@petabridge.com>
  • Loading branch information
Arkatufus and Aaronontheweb committed Oct 4, 2022
1 parent 3f89a3a commit dccc5e7
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,26 @@ private AbsolutePath[] GetDockerProjects()
.Description("Install `Nuke.GlobalTool` and SignClient")
.Executes(() =>
{
DotNet($@"dotnet tool install SignClient --version 1.3.155 --tool-path ""{ToolsDir}"" ");
DotNet($"tool install Nuke.GlobalTool --global");
});
try
{
DotNet($@"dotnet tool install SignClient --version 1.3.155 --tool-path ""{ToolsDir}"" ");
}
catch (ProcessException pex)
{
if (!pex.Message.Contains("is already installed"))
throw;
}
try
{
DotNet($"tool install Nuke.GlobalTool --global");
}
catch (ProcessException pex)
{
if (!pex.Message.Contains("is already installed"))
throw;
}
}).ProceedAfterFailure();

static void Information(string info)
{
Expand Down

0 comments on commit dccc5e7

Please sign in to comment.