-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Allow customizing the application symlink #2532
Conversation
👍 on both the feature and the interface. I've tested this. The Travis build will start working cleanly when you change the In the documentation, we should note that this is a general feature, not just for font :source => 'Symbola.ttf',
:target => 'AnotherName.ttf' Also on the docs - if Cask authors start using the feature, we will probably have to explain somewhere that even though an App is installed under a different name, the Bundle ID inside the App bundle is unchanged. When a user has two apps installed with the same Bundle ID, they can sometimes get unexpected behavior. |
About # with parentheses
link([{:source => 'Alfred 2.app', :target => 'AnotherName.app'}, 'Alfred 2.app/Contents/Preferences/Alfred Preferences.app'])
# without parentheses
link [{:source => 'Alfred 2.app', :target => 'AnotherName.app'}, 'Alfred 2.app/Contents/Preferences/Alfred Preferences.app'] So with multi agrs link, the agrs must be an array with each item is a hash or a string. I dont know how to write all these things into the document in an easy way. Maybe you should help me with the document here |
That's funny, when I tried, only If docs are not easy, let's do that the opposite way: I'll write the doc in a separate pull request, and you can comment on my PR until you are happy with it. Please notice I have added tests to support your work in #2543. |
How about if i like to give my custom name for each cask while install Like:
|
Thanks for your work on this @voanhduy1512! I'd like to propose a slight modification to the interface here and see what y'all think. Nearly all Cask Artifacts have been designed with the idea that you can specify them multiple times and they are merged together. class MyApp < Cask
# ...
link 'One.app'
link 'Two.app'
end For a few artifact types, we've also been able to compose by specifying multiple arguments. It looks like for I think we might be able to end up with a simpler interface if we drop support for >1 Example from #1415: class ScalaIde < Cask
# ...
link 'eclipse/Eclipse.app', :target => 'Scala IDE.app'
end Multiple links with targets: class MyAppCanary < Cask
# ...
link 'One.app', :target => 'One Canary.app'
link 'Two.app', :target => 'Two Canary.app'
end This avoids all the |
- no functional changes in this patch - preparation for interface change allowing custom target links in Homebrew#2532
Thanks for your comment and suggestions. I will modify the PR |
Sorry, wrong click :D |
@phinze I like the idea in your modified interface but i have some difficult to make it work. link 'One.app', :target => 'One Canary.app' This will make like have 2 arguments, one string and one hash, not just 1 hash. And this link 'One.app', :target => 'One Canary.app'
link 'Two.app', :target => 'Two Canary.app' will make link have 4 arguments. And I can't determine the order of them, sometimes the :target go first, sometime don't, set#merge make it too confused to determine. So to make it work like you suggest, i have to modified the dsl parser (and that too risky because it make to modify too large, may affect other artifact and your planning for them). class MyAppCanary < Cask
# ...
link :source => 'One.app', :target => 'One Canary.app'
link :source => 'Two.app', :target => 'Two Canary.app'
end A little longer but easy to make it work (in fact is done with the current state of this PR) and no modified to other part of the project |
thanks for @rolandwalker advices, i think i can make the interface like @phinze suggestion, wait for my PR |
- no functional changes in this patch - preparation for interface change allowing custom target links in Homebrew#2532
Travis won't like this until/if Homebrew#2532 is merged.
Allow customizing the application symlink
tests for #2532 - customizing target symlink
Followup for Homebrew#2532.
This follows up Homebrew#2532 and Homebrew#2392 abstracting out some duplicated code. Still not perfect, but better.
An enhancement to support #1415