Skip to content

Commit b7bc695

Browse files
committed
fix: skip conditional errors if the installation is failing
1 parent 0915651 commit b7bc695

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
@@ -220,7 +220,7 @@ function terms_of_service {
220220
[string]$Alias
221221
)
222222
$confirmed_alias = check_slack_binary_exist $Alias $Version $true
223-
if (Get-Command $confirmed_alias) {
223+
if (Get-Command $confirmed_alias -ErrorAction SilentlyContinue) {
224224
Write-Host "`nUse of the Slack CLI should comply with the Slack API Terms of Service:"
225225
Write-Host " https://slack.com/terms-of-service/api"
226226
}
@@ -232,7 +232,7 @@ function feedback_message {
232232
[string]$Alias
233233
)
234234
$confirmed_alias = check_slack_binary_exist $Alias $Version $false
235-
if (Get-Command $confirmed_alias) {
235+
if (Get-Command $confirmed_alias -ErrorAction SilentlyContinue) {
236236
Write-Host "`nWe would love to know how things are going. Really. All of it."
237237
Write-Host " Survey your development experience with ``$confirmed_alias feedback``"
238238
}

0 commit comments

Comments
 (0)