From 1b012ccfa5c9155379feaedb36d47c0824a4fe3d Mon Sep 17 00:00:00 2001 From: Roy Date: Fri, 20 Nov 2020 18:17:38 +0100 Subject: [PATCH] Various Powershell Fixes (#7854) * Remove incorrect x64 error message when showing usage description * Add missing escape characters in usage description The actual environment variable value would be printed without these escape characters. * Add missing quotation marks in usage description * Also test existence of sha and signature files For multiple reason the executable could be downloaded, but not the signature files. Later on the script will error out because these files are lacking. Co-authored-by: Raul Jordan --- prysm.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/prysm.ps1 b/prysm.ps1 index bd9eaa4e94..afb5366558 100644 --- a/prysm.ps1 +++ b/prysm.ps1 @@ -3,7 +3,6 @@ $ProgressPreference = 'SilentlyContinue' # Disable Invoke-WebRequest progress ba # Complain if invalid arguments were provided. if ("beacon-chain", "validator", "slasher" -notcontains $args[0]) { - Write-Host "ERROR: prysm is only supported on 64-bit Operating Systems" -ForegroundColor Red; Write-Host @" Usage: ./prysm.sh1 PROCESS FLAGS. @@ -14,12 +13,12 @@ Use this script to download the latest Prysm release binaries. Downloaded binaries are saved to .\dist To specify a specific release version: - $env:USE_PRYSM_VERSION=v1.0.0-alpha3 + `$env:USE_PRYSM_VERSION="v1.0.0-beta.3" to resume using the latest release: Remove-Item env:USE_PRYSM_VERSION To automatically restart crashed processes: - $env:PRYSM_AUTORESTART=$TRUE ; .\prysm.sh1 beacon-chain + `$env:PRYSM_AUTORESTART=`$TRUE ; .\prysm.sh1 beacon-chain to stop autorestart run: Remove-Item env:PRYSM_AUTORESTART "@; @@ -61,7 +60,7 @@ else { $fileName = "$($args[0])-$version-windows-amd64.exe"; $folderBin = "$folderDist\$fileName"; -if (Test-Path $folderBin) { +if ((Test-Path $folderBin) -and (Test-Path "$folderBin.sha256") -and (Test-Path "$folderBin.sig")) { Write-Host "$($args[0]) is up to date with version: $version" -ForegroundColor Green; } else {