Skip to content

Commit

Permalink
Various Powershell Fixes (#7854)
Browse files Browse the repository at this point in the history
* 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 <raul@prysmaticlabs.com>
  • Loading branch information
0xShammah and rauljordan committed Nov 20, 2020
1 parent 60cdd69 commit 1b012cc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions prysm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
"@;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 1b012cc

Please sign in to comment.