Spoons icon indicating copy to clipboard operation
Spoons copied to clipboard

updates BrewInfo cask commands to use --cask flag

Open samdfonseca opened this issue 4 years ago • 4 comments

The brew cask info and brew cask cat commands are disabled in recent homebrew versions. This replaces them with brew info --cask and brew info [--formula|--cask] --json=v2.

samdfonseca avatar Jan 14 '21 03:01 samdfonseca

@zzamboni could you take a look at this one?

cmsj avatar Feb 09 '21 12:02 cmsj

@cmsj happy to do so!

@samdfonseca thanks for the PR, I had been meaning to look into this.

First of all, please note that your PR includes changes to a few extraneous files, these should be removed.

A few comments with respect to the BrewInfo patch itself:

  • My main observation is that with the new versions, it is not really necessary to have different entry points for Formulae and Casks, since the info command works the same for both of them. In fact, in my own configuration I have disabled the Cask hotkeys and use now the Formula hotkeys for both Formulae and Casks.
  • I see you have modified the command to use JSON output, which is nice, but this also works without having to specify --cask or --formula, so the commands can again be unified.

Overall I see a chance to significantly simplify the code based on the recent Homebrew changes.

If you want to take a stab a it I'd be happy to take a look.

zzamboni avatar Feb 09 '21 15:02 zzamboni

@zzamboni perhaps we should pull out the cask specific changes into a new PR? If so, do you want to do that? If not, I can.

cmsj avatar Apr 06 '21 15:04 cmsj

@cmsj I'll take it - I've been meaning to take a look at it anyway. Thanks for the ping!

zzamboni avatar Apr 06 '21 15:04 zzamboni