Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After uninstalling from script and brew install finch the output says something about "upgrade" #687

Closed
stockholmux opened this issue Nov 7, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@stockholmux
Copy link

Describe the bug
Briefly describe the problem you are having.

I had a weird experience installing finch. After uninstalling, then re-installing with brew, I got a message that it was an upgrade making me think the uninstall isn't fully clean.

Steps to reproduce
A clear, step-by-step set of instructions to reproduce the bug.

  1. I had an older version of Finch (v0.6.2) installed on a machine.
  2. I couldn't remember if I installed it via a script or homebrew so I ran brew uninstall finch which returned Error: Cask 'finch' is not installed.
  3. I ran sudo bash /Applications/Finch/uninstall.sh which yielded Application uninstall process finished
  4. I ran brew install finch which yielded:
installer: Package name is Finch
installer: Upgrading at base path /
installer: The upgrade was successful.
 finch was successfully installed!

"Upgrading" and "upgrade was successful" seem out-of-place after an unstall.

Expected behavior
Description of what you expected to happen.

brew install finch should not be able to detect that finch was ever installed on a machine if I run the uninstall script.

Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.

Additional context
Add any other context about the problem here.

To help debug the issue as quickly as possible, we recommend generating a support bundle with finch support-bundle generate and attaching it to this issue. This packages all Finch-related configs and logs into one file.

@stockholmux stockholmux added the bug Something isn't working label Nov 7, 2023
@KevinLiAWS KevinLiAWS self-assigned this Nov 7, 2023
KevinLiAWS added a commit that referenced this issue Nov 8, 2023
…ostinstall and uninstall (#688)

Issue #, if available:
#687
Old finch installation registry remains if uninstall script not
explicitly called, the mac will treat a new installation with upgrade
info message.

*Description of changes:*
Added a full clean up step in the postinstall script to remove all old
registries except the current installed version. Also make the uninstall
script not only remove the current but also remove all historical
registry record.

*Testing done:*
Tested with cloud build:
https://github.com/runfinch/finch/actions/runs/6791189430
Also validated locally with pkg installation:
```
// Before install the fixed pkg, it print all finch registries
% pkgutil --pkgs | grep '^org\.Finch'
org.Finch.v0.8.0
org.Finch.pkg-tool
org.Finch.v0.7.0
org.Finch.v0.6.2
org.Finch.main
org.Finch.0.6.0
org.Finch.0.4.1
org.Finch.0.4.0

// After install the fixed pkg, it only has the current registry
% pkgutil --pkgs | grep '^org\.Finch'
org.Finch.fix-unregistry

// After execute uninstall, all the registries are removed
% pkgutil --pkgs | grep '^org\.Finch'
% // empty
```


- [X] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Signed-off-by: Kevin Li <[email protected]>
@pendo324
Copy link
Member

Closing issue since fix is merged. Will be reflected in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants