From 517c0c62967397abd6f43bd8e8dfdfd5af9505e3 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Wed, 6 Aug 2025 23:08:13 -0700 Subject: [PATCH 1/8] fix: hide version checks at the end of windows install script --- scripts/install-windows-dev.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 865e8fbb..7eb6a79a 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -326,11 +326,11 @@ function terms_of_service { [Parameter(HelpMessage = "Alias of Slack CLI")] [string]$Alias ) - $confirmed_alias = check_slack_binary_exist $Alias $Version $false - if (Get-Command $confirmed_alias) { - Write-Host "`nUse of the Slack CLI should comply with the Slack API Terms of Service:" - Write-Host " https://slack.com/terms-of-service/api" - } + # $confirmed_alias = check_slack_binary_exist $Alias $Version $false + # if (Get-Command $confirmed_alias) { + Write-Host "`nUse of the Slack CLI should comply with the Slack API Terms of Service:" + Write-Host " https://slack.com/terms-of-service/api" + # } } function next_step_message { @@ -368,6 +368,6 @@ Write-Host "`nAdding developer tooling for an enhanced experience..." install_git $SkipGit install_deno_vscode_extension $SkipDeno Write-Host "Sweet! You're all set to start developing!" -feedback_message $Alias +# feedback_message $Alias terms_of_service $Alias -next_step_message $Alias +# next_step_message $Alias From f411ccc45209748323ce8858644957c69d63516c Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 29 Aug 2025 16:05:57 -0700 Subject: [PATCH 2/8] fix: swap fingerprint for version --- scripts/install-windows-dev.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 8f093bfe..6c8ab873 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -58,7 +58,7 @@ function check_slack_binary_exist() { delay 0.2 "Heads up! A binary called ``$SLACK_CLI_NAME`` was found!" delay 0.3 "Now checking if it's the same Slack CLI..." } - & $SLACK_CLI_NAME _fingerprint | Tee-Object -Variable get_finger_print | Out-Null + & $SLACK_CLI_NAME --version | Tee-Object -Variable slack_cli_version | Out-Null if ($get_finger_print -ne $FINGERPRINT) { & $SLACK_CLI_NAME --version | Tee-Object -Variable slack_cli_version | Out-Null if (!($slack_cli_version -contains "Using ${SLACK_CLI_NAME}.exe v")) { @@ -218,7 +218,7 @@ function terms_of_service { [Parameter(HelpMessage = "Alias of Slack CLI")] [string]$Alias ) - # $confirmed_alias = check_slack_binary_exist $Alias $Version $false + $confirmed_alias = check_slack_binary_exist $Alias $Version $false # if (Get-Command $confirmed_alias) { Write-Host "`nUse of the Slack CLI should comply with the Slack API Terms of Service:" Write-Host " https://slack.com/terms-of-service/api" From 18f4fdefa3705436a52759dd5975bcc9534dbe65 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 29 Aug 2025 16:17:45 -0700 Subject: [PATCH 3/8] fix: remove existing installation checks --- scripts/install-windows-dev.ps1 | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 6c8ab873..728ae070 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -58,19 +58,6 @@ function check_slack_binary_exist() { delay 0.2 "Heads up! A binary called ``$SLACK_CLI_NAME`` was found!" delay 0.3 "Now checking if it's the same Slack CLI..." } - & $SLACK_CLI_NAME --version | Tee-Object -Variable slack_cli_version | Out-Null - if ($get_finger_print -ne $FINGERPRINT) { - & $SLACK_CLI_NAME --version | Tee-Object -Variable slack_cli_version | Out-Null - if (!($slack_cli_version -contains "Using ${SLACK_CLI_NAME}.exe v")) { - Write-Host "Error: Your existing ``$SLACK_CLI_NAME`` command is different from this Slack CLI!" - Write-Host "Halting the install to avoid accidentally overwriting it." - - Write-Host "`nTry using an alias when installing to avoid name conflicts:" - Write-Host "`nirm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 -Alias your-preferred-alias | iex" - throw - } - } - $message = "It is the same Slack CLI! Upgrading to the latest version..." if ($Version) { $SLACK_CLI_VERSION = $Version $message = "It is the same Slack CLI! Switching over to v$Version..." From f32fa48f70f711c5b7b9fae6bbc7d91bf795f16b Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 29 Aug 2025 16:24:08 -0700 Subject: [PATCH 4/8] feat: change the windows exit code --- scripts/install-windows-dev.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 728ae070..4fabbfe0 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -247,7 +247,7 @@ function next_step_message { trap { Write-Host "`nWe would love to know how things are going. Really. All of it." Write-Host "Submit installation issues: https://github.com/slackapi/slack-cli/issues" - exit 1 + exit 7 } install_slack_cli $Alias $Version From c12e2a3ad5305a500aaa197ac2c520811bf1a5b9 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Tue, 24 Feb 2026 23:50:01 -0800 Subject: [PATCH 5/8] fix: avoid running a blank git command in checks --- scripts/install-windows-dev.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 6382a033..115013ea 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -172,7 +172,7 @@ function install_git { } else { try { - git | Out-Null + Get-Command git -ErrorAction Stop | Out-Null Write-Host "Git is already installed. Nice!" } catch [System.Management.Automation.CommandNotFoundException] { From c21a654949ec55545161331c9411dcc44740fc65 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Tue, 24 Feb 2026 23:57:01 -0800 Subject: [PATCH 6/8] chore: finalize changes --- scripts/install-windows-dev.ps1 | 27 ++++++++++++++++++++------- scripts/install-windows.ps1 | 2 +- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 115013ea..12c9d0d7 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -58,6 +58,19 @@ function check_slack_binary_exist() { delay 0.2 "Heads up! A binary called ``$SLACK_CLI_NAME`` was found!" delay 0.3 "Now checking if it's the same Slack CLI..." } + & $SLACK_CLI_NAME _fingerprint | Tee-Object -Variable get_finger_print | Out-Null + if ($get_finger_print -ne $FINGERPRINT) { + & $SLACK_CLI_NAME --version | Tee-Object -Variable slack_cli_version | Out-Null + if (!($slack_cli_version -contains "Using ${SLACK_CLI_NAME}.exe v")) { + Write-Host "Error: Your existing ``$SLACK_CLI_NAME`` command is different from this Slack CLI!" + Write-Host "Halting the install to avoid accidentally overwriting it." + + Write-Host "`nTry using an alias when installing to avoid name conflicts:" + Write-Host "`nirm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 -Alias your-preferred-alias | iex" + throw + } + } + $message = "It is the same Slack CLI! Upgrading to the latest version..." if ($Version) { $SLACK_CLI_VERSION = $Version $message = "It is the same Slack CLI! Switching over to v$Version..." @@ -206,10 +219,10 @@ function terms_of_service { [string]$Alias ) $confirmed_alias = check_slack_binary_exist $Alias $Version $false - # if (Get-Command $confirmed_alias) { - Write-Host "`nUse of the Slack CLI should comply with the Slack API Terms of Service:" - Write-Host " https://slack.com/terms-of-service/api" - # } + if (Get-Command $confirmed_alias) { + Write-Host "`nUse of the Slack CLI should comply with the Slack API Terms of Service:" + Write-Host " https://slack.com/terms-of-service/api" + } } function feedback_message { @@ -247,7 +260,7 @@ function next_step_message { trap { Write-Host "`nWe would love to know how things are going. Really. All of it." Write-Host "Submit installation issues: https://github.com/slackapi/slack-cli/issues" - exit 7 + exit 1 } install_slack_cli $Alias $Version @@ -255,5 +268,5 @@ Write-Host "`nAdding developer tooling for an enhanced experience..." install_git $SkipGit Write-Host "Sweet! You're all set to start developing!" terms_of_service $Alias -# feedback_message $Alias -# next_step_message $Alias +feedback_message $Alias +next_step_message $Alias diff --git a/scripts/install-windows.ps1 b/scripts/install-windows.ps1 index d1a319e0..3ed88e7e 100644 --- a/scripts/install-windows.ps1 +++ b/scripts/install-windows.ps1 @@ -176,7 +176,7 @@ function install_git { } else { try { - git | Out-Null + Get-Command git -ErrorAction Stop | Out-Null Write-Host "Git is already installed. Nice!" } catch [System.Management.Automation.CommandNotFoundException] { From 0c9c4b68a3fb3c370ef687a76eaef10917ce9ff9 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Wed, 25 Feb 2026 00:03:00 -0800 Subject: [PATCH 7/8] test: remove fingerprint check --- scripts/install-windows-dev.ps1 | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 12c9d0d7..6fb32d3e 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -58,19 +58,6 @@ function check_slack_binary_exist() { delay 0.2 "Heads up! A binary called ``$SLACK_CLI_NAME`` was found!" delay 0.3 "Now checking if it's the same Slack CLI..." } - & $SLACK_CLI_NAME _fingerprint | Tee-Object -Variable get_finger_print | Out-Null - if ($get_finger_print -ne $FINGERPRINT) { - & $SLACK_CLI_NAME --version | Tee-Object -Variable slack_cli_version | Out-Null - if (!($slack_cli_version -contains "Using ${SLACK_CLI_NAME}.exe v")) { - Write-Host "Error: Your existing ``$SLACK_CLI_NAME`` command is different from this Slack CLI!" - Write-Host "Halting the install to avoid accidentally overwriting it." - - Write-Host "`nTry using an alias when installing to avoid name conflicts:" - Write-Host "`nirm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 -Alias your-preferred-alias | iex" - throw - } - } - $message = "It is the same Slack CLI! Upgrading to the latest version..." if ($Version) { $SLACK_CLI_VERSION = $Version $message = "It is the same Slack CLI! Switching over to v$Version..." From 8e1947bdd88acff26ec877a9b2d0e2a3053b1362 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Wed, 25 Feb 2026 02:45:37 -0800 Subject: [PATCH 8/8] revert: include fingerprint check --- scripts/install-windows-dev.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 6fb32d3e..12c9d0d7 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -58,6 +58,19 @@ function check_slack_binary_exist() { delay 0.2 "Heads up! A binary called ``$SLACK_CLI_NAME`` was found!" delay 0.3 "Now checking if it's the same Slack CLI..." } + & $SLACK_CLI_NAME _fingerprint | Tee-Object -Variable get_finger_print | Out-Null + if ($get_finger_print -ne $FINGERPRINT) { + & $SLACK_CLI_NAME --version | Tee-Object -Variable slack_cli_version | Out-Null + if (!($slack_cli_version -contains "Using ${SLACK_CLI_NAME}.exe v")) { + Write-Host "Error: Your existing ``$SLACK_CLI_NAME`` command is different from this Slack CLI!" + Write-Host "Halting the install to avoid accidentally overwriting it." + + Write-Host "`nTry using an alias when installing to avoid name conflicts:" + Write-Host "`nirm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 -Alias your-preferred-alias | iex" + throw + } + } + $message = "It is the same Slack CLI! Upgrading to the latest version..." if ($Version) { $SLACK_CLI_VERSION = $Version $message = "It is the same Slack CLI! Switching over to v$Version..."