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

developer/bin/generate_cask_token: fix .sub! on non-string exception #186283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yurikoles
Copy link
Contributor

Signed-off-by: Yurii Kolesnykov [email protected]


@yurikoles yurikoles changed the title developer/bin/generate_cask_token: fix .sub! on class exception developer/bin/generate_cask_token: fix .sub! on non-string Sep 22, 2024
@yurikoles yurikoles changed the title developer/bin/generate_cask_token: fix .sub! on non-string developer/bin/generate_cask_token: fix .sub! on non-string exception Sep 22, 2024
@yurikoles
Copy link
Contributor Author

yurikoles commented Sep 22, 2024

Before:

$ generate_cask_token "Windows App.app" 

homebrew/Library/Taps/homebrew/homebrew-cask/developer/bin/generate_cask_token:254:in `remove_trailing_strings_and_versions': undefined method `sub!' for an instance of AppName (NoMethodError)

      app_name.sub!(self.class.remove_trailing_pat, "")
              ^^^^^
	from /opt/homebrew/Library/Taps/homebrew/homebrew-cask/developer/bin/generate_cask_token:267:in `simplified'
	from /opt/homebrew/Library/Taps/homebrew/homebrew-cask/developer/bin/generate_cask_token:368:in `simplified_app_name'
	from /opt/homebrew/Library/Taps/homebrew/homebrew-cask/developer/bin/generate_cask_token:372:in `cask_file_name'
	from /opt/homebrew/Library/Taps/homebrew/homebrew-cask/developer/bin/generate_cask_token:376:in `cask_token'
	from /opt/homebrew/Library/Taps/homebrew/homebrew-cask/developer/bin/generate_cask_token:397:in `report'
	from /opt/homebrew/Library/Taps/homebrew/homebrew-cask/developer/bin/generate_cask_token:437:in `<main>'

After:

$ generate_cask_token "Windows App.app"
Proposed token:               windows
Proposed file name:           windows.rb
Cask Header Line:             cask "windows" do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants