Skip to content

Commit 8e1947b

Browse files
committed
revert: include fingerprint check
1 parent 0c9c4b6 commit 8e1947b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

scripts/install-windows-dev.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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 "`nTry using an alias when installing to avoid name conflicts:"
69+
Write-Host "`nirm 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..."

0 commit comments

Comments
 (0)