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

Make staged_path work in installer stanzas #8887

Merged
merged 1 commit into from
Dec 17, 2015
Merged

Make staged_path work in installer stanzas #8887

merged 1 commit into from
Dec 17, 2015

Conversation

ponychicken
Copy link
Contributor

This should add support for using staged_path in installer stanzas. It also did work just fine two weeks ago, but now suddenly self.name is always returning KlassPrefixActualname instead of Actualname. Setting name at the start of the recipe doesn't fix it either. How do I get the actual name?

@tapeinosyne tapeinosyne added the core Issue with Homebrew itself rather than with a specific cask. label Jan 13, 2015
@ponychicken
Copy link
Contributor Author

@vitorgalvao could you have a look at this?

@ponychicken
Copy link
Contributor Author

Ah, this broke again by some change to some other file. It would be nice to get this patched in core somehow, right now I'm updating this pr every few weeks, but it quickly breaks again later on.

@phinze
Copy link
Contributor

phinze commented Feb 12, 2015

Hey @ponychicken, sorry about the delay on this. The thing stopping me from just merging this is the fact that we've got some wheels in motion around the upcoming brew cask upgrade feature which have a large impact across the codebase. Crucially, we need to be able to address more than one version of a given Cask.

So exposing staged_path inside Casks is definitely something I want to do, it's just something I'd like to introduce with full knowledge about how it will work once we're dealing in properly versioned cask objects. So hang tight - I won't forget about you! 😀

@ponychicken
Copy link
Contributor Author

Great to hear, I understand you want to stabilise things first!

@svenjacobs
Copy link
Contributor

Any reason why this is not merged yet? It kinda blocks me from writing a cask for JDownloader 2. See this comment.

@jawshooah
Copy link
Contributor

With #13201 in the works, there's no longer any concern about maintaining multiple installed versions of casks. Merging this now.

jawshooah added a commit that referenced this pull request Dec 17, 2015
Make staged_path work in installer stanzas
@jawshooah jawshooah merged commit 563a46b into Homebrew:master Dec 17, 2015
@sparhomenko
Copy link
Contributor

I've tried to use #{staged_path} in the installer stanza in a cask:

  installer :script => 'DbVisualizer Installer.app/Contents/MacOS/JavaApplicationStub',
            :args => ['-q', '-dir', "#{staged_path}"]

and got an error:

Warning: Unexpected method 'caskroom' called on Cask dbvisualizer.
Error: undefined method `join' for nil:NilClass
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/dsl.rb:229:in `staged_path'
<main>:9:in `<class:KlassPrefixDbvisualizer>'
<main>:in `<main>'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/source/path_base.rb:72:in `eval'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/source/path_base.rb:72:in `rescue in load'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/source/path_base.rb:69:in `load'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/source/tapped.rb:28:in `load'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc.rb:85:in `load'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/uninstall.rb:8:in `block in run'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/uninstall.rb:6:in `each'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/uninstall.rb:6:in `run'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:78:in `run_command'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:116:in `process'
/usr/local/Library/Taps/caskroom/homebrew-cask/cmd/brew-cask.rb:26:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/brew.rb:69:in `require?'
/usr/local/Library/brew.rb:149:in `<main>'

Does it work for anyone else?

@jawshooah
Copy link
Contributor

Ah, my apologies. Should have tried to use it in a cask before merging. I'll push a fix in a bit.

@jawshooah
Copy link
Contributor

@sparhomenko Fixed in #15911.

@sparhomenko
Copy link
Contributor

Works now, thanks.

@miccal miccal removed core Issue with Homebrew itself rather than with a specific cask. enhancement labels Dec 23, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants