Skip to content

Commit 697d821

Browse files
Update PowerShell setup scripts to allow Enter key as default confirmation (Y)
Co-authored-by: waldekmastykarz <[email protected]>
1 parent b754f27 commit 697d821

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

scripts/setup-beta.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ Write-Host "4. Configure Dev Proxy and its files as executable (Linux and macOS
1818
Write-Host "5. Configure new version notifications for the beta channel"
1919
Write-Host "6. Add the devproxy-beta directory to your PATH environment variable in `$PROFILE.CurrentUserAllHosts"
2020
Write-Host ""
21-
Write-Host "Continue (y/n)? " -NoNewline
22-
$response = [System.Console]::ReadKey().KeyChar
21+
$response = Read-Host "Continue (Y/n)?"
2322

24-
if ($response -notin @('y', 'Y')) {
25-
Write-Host "`nExiting"
23+
if ($response -in @('n', 'N')) {
24+
Write-Host "Exiting"
2625
exit 1
2726
}
2827

scripts/setup.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ Write-Host "3. Unzip the release in the devproxy directory"
1717
Write-Host "4. Configure devproxy and its files as executable (Linux and macOS only)"
1818
Write-Host "5. Add the devproxy directory to your PATH environment variable in `$PROFILE.CurrentUserAllHosts"
1919
Write-Host ""
20-
Write-Host "Continue (y/n)? " -NoNewline
21-
$response = [System.Console]::ReadKey().KeyChar
20+
$response = Read-Host "Continue (Y/n)?"
2221

23-
if ($response -notin @('y', 'Y')) {
24-
Write-Host "`nExiting"
22+
if ($response -in @('n', 'N')) {
23+
Write-Host "Exiting"
2524
exit 1
2625
}
2726

0 commit comments

Comments
 (0)