-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Better nested container syntax #1248
Comments
or if the container parameter give more information about the container
|
Ooo good idea!
The So there's not really any information we have available to yield to the block; everything is still relative to the cask root. I ❤️ the idea of the blocks expressing the nesting though. I'll try and pick this up on my next pass on this feature. class SpeedDownload < Cask
url 'http://mirror.nscocoa.com/~yazsoftc1/files/sd5/sd5.zip'
homepage 'http://www.yazsoft.com/products/speed-download'
version 'latest'
no_checksum
container 'Speed Download 5.dmg' do
link 'Speed Download 5/Speed Download.app'
end
end |
Ah ok And if it always the same path - what if link is relative to container then we can make it DRY: container 'Speed Download 5.dmg' do
# because its inside the container
# this calls link 'Speed Download 5/Speed Download.app'
link 'Speed Download.app'
end |
Yeah I see what you're going for, but that's my point - it's not always the same path. It happened to be that
There could be another app that does not nest inside a folder like that (in fact most So given
The syntax would be: container `Another App.dmg` do
link 'Another App.app'
end Does that make sense? |
Yes that makes sense. |
I add a new `container` dsl. With this new dsl, we can drop `nested_container`.
Nested containers introduced in #1232
Current syntax is:
I suggest a more logical dsl for nested container:
The text was updated successfully, but these errors were encountered: