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

brew cu has nothing display. #59

Closed gatspy closed 5 years ago

gatspy commented 7 years ago

run brew cu , has nothing results display

==> Finding outdated apps
====================================================
No.  Name  Cask  Current  Latest  Auto-Update  State
====================================================
====================================================
buo commented 7 years ago
brew cask list

What does this command give you?

gatspy commented 7 years ago

brew cask list command as follows cheatsheet font-hack geany keycastr ksdiff launchrocket postman

ryb73 commented 7 years ago

I'm running into the same problem. My brew cask list:

[~] brew cask list                                                                                       
Warning: Calling `brew cask` with the `--caskroom` flag is deprecated and will be disabled on 2017-10-31!
There is no replacement.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/options.rb:53:in `call'

airparrot                  diffmerge                  mono-mdk                   spotify-notifications
alfred                     discord                    ngrok                      steam
appcleaner                 disk-inventory-x           notion                     the-unarchiver
balsamiq-mockups           dropbox                    phpstorm                   transmission
bettertouchtool            flux                       pinta                      virtualbox
boom                       gimp                       postman                    visual-studio-code
chicken                    google-chrome              sequel-pro                 vlc
colloquy                   inkscape                   skype                      vlc-nightly
colour-contrast-analyser   inssider                   slack                      xquartz
commander-one              kdiff3                     spectacle
deluge                     keyboard-maestro           spotify

I can tell that some of the packages do have newer versions by using brew cask info:

[~] brew cask info gimp                                                                                  
Warning: Calling `brew cask` with the `--caskroom` flag is deprecated and will be disabled on 2017-10-31!
There is no replacement.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/options.rb:53:in `call'

gimp: 2.8.22
https://www.gimp.org/
/opt/homebrew-cask/Caskroom/gimp/2.8.20-x86_64 (68B)
From: https://github.com/caskroom/homebrew-cask/blob/master/Casks/gimp.rb
==> Name
GIMP
==> Artifacts
GIMP.app (app)

Note that the most recent version is 2.8.22, but the installed version is 2.8.20. Some apps auto-update themselves, so it's not a problem in those cases, but some apps don't auto-update (e.g. gimp).

jikkujose commented 6 years ago

Yes, my cask is also outdated

ondrejfuhrer commented 6 years ago

@ryb73 @JikkuJose Could you guys please post the result of brew cu ? For me everything works fine so not sure where is the issue.

ryb73 commented 6 years ago

@ondrejfuhrer

[~] brew cu                                                                                              
==> Options
Include auto-update (-a): false
Include latest (-f): false
==> Updating Homebrew
Already up-to-date.
==> Finding outdated apps
  Cask  Current  Latest  A/U  Result

Let me know if there's more info I can provide

ondrejfuhrer commented 6 years ago

@ryb73 That looks suspicious. What I would suggest is to take a look on the ENV variables. What seems suspicious to me is that deprecation message. Do you have somewhere defined a different then default --caskroom ? Because there is no --caskroom definition in your command, but the brew is still complaining.

That could cause the issue, becuase I think it could happen that cu script is looking into a different caskroom then the brew cask list script

ondrejfuhrer commented 6 years ago

@ryb73 I would also suggest to run brew cask doctor to see if there are any issues

ondrejfuhrer commented 6 years ago

@ryb73 Me again 🙂 I just tested my theory and it is right. The problem here is, that you are using a deprecated option --caskroom, which you have set to /opt/homebrew-cask/Caskroom which you can see in the brew cask info output. By default the caskroom should be /usr/local/Caskroom/ (so you also don't have any issues with permissions).

The cu script don't take into an account the --caskroom setup so it tried to get the installed casks from the /usr/local directory, but yours are in /opt.

Since the option is already deprecated and will be removed in few days, I suggest following:

  1. you remove the --caskroom setup (probably in your .profile, .zshrc or similar
  2. move all the installed casks from /opt/homebrew-cask/Caskroom to /usr/local/Caskroom (mv /opt/homebrew-cask/Caskroom/* /usr/local/Caskroom).

I'm not 100% sure that everything will be 100% working, if not, you will need to reinstall those casks that are not working.

Then after running brew cu you should get the result there 🙂 Let me know if that worked.

ondrejfuhrer commented 6 years ago

@gatspy ad @JikkuJose Can you guys please share an update, how it works for you?