File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,19 @@ function check_slack_binary_exist() {
5858 delay 0.2 " Heads up! A binary called `` $SLACK_CLI_NAME `` was found!"
5959 delay 0.3 " Now checking if it's the same Slack CLI..."
6060 }
61+ & $SLACK_CLI_NAME _fingerprint | Tee-Object - Variable get_finger_print | Out-Null
62+ if ($get_finger_print -ne $FINGERPRINT ) {
63+ & $SLACK_CLI_NAME -- version | Tee-Object - Variable slack_cli_version | Out-Null
64+ if (! ($slack_cli_version -contains " Using ${SLACK_CLI_NAME} .exe v" )) {
65+ Write-Host " Error: Your existing `` $SLACK_CLI_NAME `` command is different from this Slack CLI!"
66+ Write-Host " Halting the install to avoid accidentally overwriting it."
67+
68+ Write-Host " `n Try using an alias when installing to avoid name conflicts:"
69+ Write-Host " `n irm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 -Alias your-preferred-alias | iex"
70+ throw
71+ }
72+ }
73+ $message = " It is the same Slack CLI! Upgrading to the latest version..."
6174 if ($Version ) {
6275 $SLACK_CLI_VERSION = $Version
6376 $message = " It is the same Slack CLI! Switching over to v$Version ..."
You can’t perform that action at this time.
0 commit comments