buo / homebrew-cask-upgrade

A command line tool for upgrading every outdated app installed by Homebrew Cask
MIT License
2.44k stars 90 forks source link

Apps deleted from "Applications"-folder instead of upgraded #161

Closed marcon89 closed 2 years ago

marcon89 commented 4 years ago

Thank you for your amazing work!!!

There seems to be an issue with app replacement. The purging of the source seems to come before the app is installed. The result being that the apps get removed from the "Applications" folder. Both were forced installs, one was "latest". All other apps upgraded correctly. I have included the code from my terminal window:

==> Upgrading keka to 1.1.28
==> Downloading https://github.com/aonez/Keka/releases/download/v1.1.28/Keka-1.1.28.dmg
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/73220421/cf8ffd00-8bd0-11ea-8a9d-69fabc1e9fef?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Cr
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'keka'.
==> Installing Cask keka
ditto: WARNING: bom /var/folders/ml/l7hs05xx5jlc2ks141s9j_hh0000gp/T/20200503-22319-7iwwd2.bom contains no files, nothing copied
Warning: It seems there is already an App at '/Applications/Keka.app'; overwriting.
==> Removing App '/Applications/Keka.app'.
==> Purging files for version 1.1.28 of Cask keka
Error: It seems the App source '/usr/local/Caskroom/keka/1.1.28/Keka.app' is not there.
==> Upgrading launchpad-manager to latest
==> Downloading http://launchpadmanager.com/download_yosemite.php/LaunchpadManagerYosemite.dmg
######################################################################## 100.0%
==> No SHA-256 checksum defined for Cask 'launchpad-manager', skipping verification.
==> Installing Cask launchpad-manager
Warning: It seems there is already an App at '/Applications/Launchpad Manager.app'; overwriting.
==> Removing App '/Applications/Launchpad Manager.app'.
==> Purging files for version latest of Cask launchpad-manager
Error: It seems the App source '/usr/local/Caskroom/launchpad-manager/latest/Launchpad Manager.app' is not there.
marcon89 commented 4 years ago

A manual reinstall of the two apps went without problem.

ondrejfuhrer commented 4 years ago

Hey @marcon89 , thx for reporting this. May I ask you what command did you run (with all the parameters)? This right now doesn't seem like an issue with this tap as we don't manipulate the installation steps (that is maintained in the main homebrew repository).

But I'll try to see if I can maybe reproduce that or try to help you in any way.

marcon89 commented 4 years ago

Sorry, for the late reply. I ran "brew cu -a -f".

naveenkrdy commented 4 years ago

Same issue here.

brew cu -af

==> Installing Cask font-menlo-for-powerline
Warning: It seems there is already a Font at '/Users/naveen/Library/Fonts/Menlo for Powerline.ttf'; overwriting.
==> Removing Font '/Users/naveen/Library/Fonts/Menlo for Powerline.ttf'.
==> Purging files for version latest of Cask font-menlo-for-powerline
Error: It seems the Font source '/usr/local/Caskroom/font-menlo-for-powerline/latest/Menlo-for-Powerline-master/Menlo for Powerline.ttf' is not there.
==> Installing Cask quicklook-json
Warning: It seems there is already a QuickLook Plugin at '/Users/naveen/Library/QuickLook/QuickLookJSON.qlgenerator'; overwriting.
==> Removing QuickLook Plugin '/Users/naveen/Library/QuickLook/QuickLookJSON.qlgenerator'.
==> Purging files for version latest of Cask quicklook-json
Error: It seems the QuickLook Plugin source '/usr/local/Caskroom/quicklook-json/latest/QuickLookJSON.qlgenerator' is not there.
==> Upgrading slack to 4.6.0
==> Downloading https://downloads.slack-edge.com/releases/macos/4.6.0/prod/x64/Slack-4.6.0-macOS.dmg
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'slack'.
==> Installing Cask slack
Warning: It seems there is already an App at '/Applications/Slack.app'; overwriting.
==> Removing App '/Applications/Slack.app'.
==> Moving App 'Slack.app' to '/Applications/Slack.app'.
🍺  slack was successfully installed!
==> Upgrading spotify to latest
==> Downloading https://download.scdn.co/Spotify.dmg
######################################################################## 100.0%
==> No SHA-256 checksum defined for Cask 'spotify', skipping verification.
==> Installing Cask spotify
Warning: It seems there is already an App at '/Applications/Spotify.app'; overwriting.
==> Removing App '/Applications/Spotify.app'.
==> Purging files for version latest of Cask spotify
Error: It seems the App source '/usr/local/Caskroom/spotify/latest/Spotify.app' is not there.
PierreMesure commented 4 years ago

I have the same issue, brew cu -a keeps removing apps.

ondrejfuhrer commented 4 years ago

Hello all, sorry for taking it so much time, I just didn't have the capacity to solve this earlier 🙁 I've also encountered another issue, when the application couldn't be updated because of existing script linked in /usr/local/bin.

I was able to fix that using reinstall command instead of the old upgrade procedure, I hope that will help with this issue as well.

I'll keep this issue open for now, please let me know if that helped with this issue as well.