Skip to content

Commit da438b4

Browse files
committed
fix: avoid hanging for unexpected command invocations
1 parent 85b2b75 commit da438b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/install-windows.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function install_git {
184184
}
185185
else {
186186
try {
187-
git | Out-Null
187+
git --version | Out-Null
188188
Write-Host "Git is already installed. Nice!"
189189
}
190190
catch [System.Management.Automation.CommandNotFoundException] {
@@ -244,7 +244,7 @@ function next_step_message {
244244
$confirmed_alias = check_slack_binary_exist $Alias $Version $false
245245
if (Get-Command $confirmed_alias -ErrorAction SilentlyContinue) {
246246
try {
247-
$confirmed_alias | Out-Null
247+
& $confirmed_alias --version | Out-Null
248248
Write-Host "`nYou're all set! Relaunch your terminal to ensure changes take effect."
249249
Write-Host " Then, authorize your CLI in your workspace with ``$confirmed_alias login``.`n"
250250
}

0 commit comments

Comments
 (0)