From 86ba58da060fe8e73fd4deefa60563c27fc40530 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sun, 6 Feb 2022 09:33:11 -0500 Subject: [PATCH] Fix missing path test in powershell release tool --- release-tool.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release-tool.ps1 b/release-tool.ps1 index fda7ff89..640742ad 100644 --- a/release-tool.ps1 +++ b/release-tool.ps1 @@ -231,7 +231,9 @@ function Invoke-GpgSignFiles([string[]] $files, [string] $key) { foreach ($_ in $files) { Write-Host "Signing file '$_' and creating DIGEST..." - Remove-Item "$_.sig" + if (Test-Path "$_.sig") { + Remove-Item "$_.sig" + } Invoke-Cmd "gpg" "--output `"$_.sig`" --armor --local-user `"$key`" --detach-sig `"$_`"" $FileName = (Get-Item $_).Name (Get-FileHash "$_" SHA256).Hash + " *$FileName" | Out-File "$_.DIGEST" -NoNewline