Skip to content

Installer aborts on an existing same-named slack binary; prefer install + warning over hard abort #671

Description

@curusarn

What happens

install.sh refuses to install if any slack already exists on PATH. On a machine where the slack-ruby-client gem provides a slack executable (an rbenv shim at ~/.rbenv/shims/slack), the installer aborts:

🛑 Error: Your existing `slack` command is different from this Slack CLI!
🔖 Try using an alias when installing to avoid name conflicts:
   curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s your-preferred-alias

Repro

  1. Have an unrelated slack on PATH. Concrete case: gem install slack-ruby-client (ships a slack executable; under rbenv it becomes ~/.rbenv/shims/slack).
  2. curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash
  3. Installer aborts instead of installing.

Why this is unhelpful

Aborting on a same-named binary is non-standard. It forced installing under an alias (| bash -s slack-cli), then manually symlinking it back to slack and reordering PATH, because rbenv shims sit ahead of ~/.local/bin, so even after installing, the CLI stayed shadowed by the gem's slack. Every other CLI installer I use just installs the binary and leaves PATH precedence to me.

Suggestion

Install regardless: place the binary + symlink as usual, and print a warning about the name collision (keep the alias tip there), instead of hard-aborting. Let the user manage their own PATH.

Env

macOS arm64, Slack CLI v4.7.0, zsh + rbenv, slack-ruby-client 2.6.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions