Skip to content

Commit

Permalink
Update PackageDownload to check if tools exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Dec 6, 2024
1 parent 281e1a7 commit fd3fabb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions ricaun.Nuke/Tools/AzureSignToolUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ private static string PackageDownload(string packageId)
{
var toolFolder = GetToolInstallationPath();

if (Globbing.GlobFiles(toolFolder, $"{packageId}.exe").FirstOrDefault() is AbsolutePath packageToolExeExists)
{
return packageToolExeExists;
}

DotNetTasks.DotNetToolInstall(x => x
.SetPackageName(packageId)
.SetToolInstallationPath(toolFolder)
);

if (Globbing.GlobFiles(toolFolder, $"{packageId}.exe").FirstOrDefault() is AbsolutePath absolutePath)
if (Globbing.GlobFiles(toolFolder, $"{packageId}.exe").FirstOrDefault() is AbsolutePath packageToolExe)
{
return absolutePath;
return packageToolExe;
}
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion ricaun.Nuke/ricaun.Nuke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<PackageId>ricaun.Nuke</PackageId>
<Version>1.9.0-alpha.2</Version>
<Version>1.9.0-alpha.3</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit fd3fabb

Please sign in to comment.