Skip to content

fix: remove Heroku CLI bin dir from PATH on Windows uninstall - #3967

Open
heroku-johnny wants to merge 1 commit into
mainfrom
fix/windows-uninstaller-path-cleanup
Open

heroku-johnny wants to merge 1 commit into
mainfrom
fix/windows-uninstaller-path-cleanup

Conversation

@heroku-johnny

Copy link
Copy Markdown
Contributor

Summary

Adds scripts/windows-installer-customization.nsi with an NSIS un.RemoveFromPath function and un.onUninstSuccess callback, wired into the installer via oclif.nsisCustomization in package.json.

When the Windows installer's uninstaller runs, it now removes $INSTDIR\bin from the user's HKCU\Environment\PATH registry value in addition to deleting the files.

Type of Change

Patch Updates (patch semver update)

  • fix: Bug fix

Testing

Steps:

  1. Build Windows installer: npm run pack:win (requires NSIS on Windows)
  2. Install the CLI — verify heroku is accessible in a new shell
  3. Uninstall via Add/Remove Programs
  4. Open a new shell and confirm %PATH% no longer contains the Heroku bin dir

Related Issues

GitHub issue: #1883

Adds an NSIS customization file with un.RemoveFromPath and un.onUninstSuccess
so that $INSTDIR\bin is removed from the user's HKCU PATH registry value
when the Windows installer uninstalls the CLI.

Closes #1883

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@heroku-johnny
heroku-johnny requested a review from a team as a code owner October 2, 2026 02:20
@heroku-johnny
heroku-johnny deployed to AcceptanceTests October 2, 2026 02:20 — with GitHub Actions Active
@heroku-johnny
heroku-johnny deployed to AcceptanceTests October 2, 2026 02:20 — with GitHub Actions Active
@heroku-johnny
heroku-johnny deployed to AcceptanceTests October 2, 2026 02:20 — with GitHub Actions Active
@heroku-johnny
heroku-johnny deployed to AcceptanceTests October 2, 2026 02:20 — with GitHub Actions Active
@github-actions github-actions Bot added the size/M Medium PR (code churn < 500) label Oct 2, 2026

@tlowrimore-heroku tlowrimore-heroku left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

This branch was successfully deployed

1 active deployment
AcceptanceTests — 0dab2d6e Deployed Oct 2, 2026 by heroku-johnny via integration (20.x, ubuntu-latest) #9391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR (code churn < 500)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants