Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Jul 8, 2025

Changelog

The installation scripts now make a kind request for feedback in issues if the installation scripts error.

Summary

This PR outputs a link to the issue tracker if installation scripts fail. Following reported errors of #147.

Preview

install

Reviewers

With these changes change the environment for testing:

$ ./scripts/install.sh           # Might error if another "slack" program exists
$ ./scripts/install.sh lack-dev  # Succeeds
$ chmod -w /usr/local/bin        # Remove permissions needed for install
$ ./scripts/install.sh lack-dev  # Errors
$ chmod +w /usr/local/bin        # Revert changes made during this testing

Notes

Before requesting a review I plan to make similar changes on Windows.

Requirements

@zimeg zimeg added this to the Next Release milestone Jul 8, 2025
@zimeg zimeg self-assigned this Jul 8, 2025
@zimeg zimeg added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes semver:patch Use on pull requests to describe the release version increment labels Jul 8, 2025
@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.38%. Comparing base (ba988dd) to head (0d1f812).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   63.38%   63.38%           
=======================================
  Files         212      212           
  Lines       22333    22333           
=======================================
  Hits        14156    14156           
+ Misses       7093     7092    -1     
- Partials     1084     1085    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimeg
Copy link
Member Author

zimeg commented Jul 8, 2025

🗣️ Powershell changes are being made in cbeed29 might resemble:

install

Edit: Punctuation in the output error was removed to be more consistent

> .\scripts\install-windows.ps1                     # Installs the latest version
> .\scripts\install-windows-dev.ps1 -Version 3.0.0  # Installs a set version
> .\scripts\install-windows-dev.ps1                 # Expected error without a download

Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔏 A few notes on the changes for the wonderful reviewers! ✨


feedback_message() {
if [ $(command -v $SLACK_CLI_NAME) ]; then
if [ $? -eq 0 ] && [ $(command -v $SLACK_CLI_NAME) ]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📣 This function is now called on errors too - we check the status before it's called to change outputs here!

else
echo "Slack CLI requires a valid semver version number." >&2
exit 1
return 1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 The exit command is replaced with a return to avoid ending the script altogether for later logic.

Write-Host " Then, authorize your CLI in your workspace with ``$confirmed_alias login``.`n"
}
catch {
throw "`nSlack CLI is not installed.`nPlease reach out to [email protected] to share the issues you are facing.`nMeanwhile you can try the manual installation: https://tools.slack.dev/slack-cli.`n"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💌 We now have an issue tracker to direct the most kind folks to!

@zimeg zimeg marked this pull request as ready for review July 8, 2025 22:06
@zimeg zimeg requested a review from a team as a code owner July 8, 2025 22:06
Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks for the quick turnaround on this @zimeg 👏🏻 I've left a minor suggestion but non-blocking!

@zimeg
Copy link
Member Author

zimeg commented Jul 9, 2025

📣 Tested this with a remote file on Windows using:

> irm https://raw.githubusercontent.com/slackapi/slack-cli/53af12a4707b58b5ac1a0283243ab3ce7b1cd360/scripts/install-windows.ps1 -Outfile installer.ps1
> .\installer.ps1 -Version 3.2.8

@zimeg
Copy link
Member Author

zimeg commented Jul 9, 2025

@mwbrooks I appreciate so much the review 🙏

One more change was made to catch the cases of an unknown version being passed to the script in 0d1f812 which catches subshell errors:

$ curl -fsSL https://raw.githubusercontent.com/slackapi/slack-cli/0d1f812fddd9392d09cb5795d54081020c3fd6b0/scripts/install.sh | bash -s -- -v 3.3.3 lack-dev

@zimeg
Copy link
Member Author

zimeg commented Jul 9, 2025

@mwbrooks With tests passing now, let's merge this for the next release 🚢 💨

I remain so interested in following up with a few more improvements, but if fast fixes are needed in the meantime let's address those first!

@zimeg zimeg merged commit 7037449 into main Jul 9, 2025
6 checks passed
@zimeg zimeg deleted the zimeg-feat-install-error-feedback branch July 9, 2025 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants