buo/homebrew-cask-upgrade

Version number contains invalid characters

wydwww opened this issue ยท 6 comments

Using the latest version, brew cu gives an error:

Error: 1.0 (107) contains invalid characters: ()!
/usr/local/Homebrew/Library/Homebrew/cask/dsl/version.rb:73:in `initialize'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/cask.rb:15:in `new'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/cask.rb:15:in `block in installed_apps'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/cask.rb:13:in `map'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/cask.rb:13:in `installed_apps'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu/command/upgrade.rb:21:in `process'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu.rb:20:in `process'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/cmd/brew-cu.rb:70:in `<top (required)>'
/usr/local/Homebrew/Library/Homebrew/utils.rb:92:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:92:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:124:in `<main>'

It is caused by quitter, whose version number is 1.0 (107).
Previously brew cu worked well handling this application.

Hey @wydwww , thx for the report. I just tried to install the app and works fine for me ๐Ÿค” Could you run brew update and then try to run brew cu again?

Hi @ondrejfuhrer , I tried brew update and brew cu. It gave the same error message.

@wydwww can you please try as well ls -la /usr/local/Caskroom/quitter and pass the result here? This is where we're getting the versions from.

@ondrejfuhrer

(base) โžœ  ~ ls -la /usr/local/Caskroom/quitter
drwxr-xr-x  - username 28 Jan  2019 .metadata
drwxr-xr-x@ - username 28 Jan  2019 1.0 (107)

@wydwww Interesting, so that's where is it coming from. Right now, if I install it, I have a different format. I would suggest reinstalling it for now, that should fix it -> brew reinstall --cask quitter

If I do the same thing, I have following:

(base) โžœ  ~ ls -la /usr/local/Caskroom/quitter
drwxr-xr-x  - username 11 Apr  2021 .metadata
drwxr-xr-x@ - username 11 Apr  2021 1.0,107

If you would get that after reinstalling it should then work ๐Ÿ™‚

Thanks for your solution!
Although brew reinstall --cask quitter and brew uninstall --cask quitter with or without --force will still give error:

Warning: No checksum defined for cask 'quitter', skipping verification.
Error: Cask 'quitter' definition is invalid: 'version' stanza failed with: 1.0 (107) contains invalid characters: ()!

Deleting /usr/local/Caskroom/quitter and installing again fixed this error. Looks like an upstream problem.