summaryrefslogtreecommitdiff
path: root/docs/static
diff options
context:
space:
mode:
authorCody McGinnis <brainwart@gmail.com>2020-11-19 19:21:50 -0500
committerPete Johanson <peter@peterjohanson.com>2020-11-19 19:32:53 -0500
commitda08b4852d4a66b751172b3f390302cf2d5c5812 (patch)
treed0f1d6907b7bf817550837cd1359f9607471ca4f /docs/static
parent3e65f6d4724371345043243ce3a7ea1ce9be64cd (diff)
fix(setup): make sure selections are numbers
Diffstat (limited to 'docs/static')
-rw-r--r--docs/static/setup.ps14
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/static/setup.ps1 b/docs/static/setup.ps1
index 5cde921..f550333 100644
--- a/docs/static/setup.ps1
+++ b/docs/static/setup.ps1
@@ -16,13 +16,13 @@ function Get-Choice-From-Options {
}
Write-Host "$($Options.length + 1)) Quit"
- $selection = Read-Host $Prompt
+ $selection = (Read-Host $Prompt) -as [int]
if ($selection -eq $Options.length + 1) {
Write-Host "Goodbye!"
exit 1
}
- elseif ($selection -le $Options.length) {
+ elseif ($selection -le $Options.length -and $selection -gt 0) {
$choice = $($selection - 1)
break
}