According to the logic of #5080, we should move away from calling
Homebrew internals, in part because things break over time, as
happened here with the implementation of `depends_on_formula`
(shortly to become `depends_on :formula`).
This re-implements formula dependencies by invoking the Homebrew
CLI, which is the only stable API Homebrew guarantees.
Fixes#5475Fixes#4010
Forgotten in #4688, but should be considered part of Cask DSL 1.0.
A `depends_on` stanza is much less useful without the corresponding
`conflicts_with`.
References: #4896
- remove font tags (per earlier discussion - they were left
in by mistake)
- add tag `:name` for corner cases where the Cask name cannot
adequately follow the product name. Examples: non-English
apps, App bundles which do not match publicized names.
This is possibly the cause of other glitches such as random
failures on Travis.
Ruby 1.8 popen3 does set global $? for the exit status, Ruby
1.9 and above does not. For Ruby 2.0 users (Mavericks and
above with recent Homebrew), success or failure of the current
external command was determined by the exit status of some
previous command.
Closescaskroom/homebrew-fonts#186
Currently, Casks names are constrained by the need to form
valid Ruby class names. This change enables a new syntax,
in which the first line of a Cask will read like
```ruby
cask :v1 => 'my-app' do
```
where :v1 refers to the version of the DSL spec.
- `:delete` is intended to replace `:files`
- `:trash` is intended to move files to the OS X Trash
- `:trash` is only a stub — currently all three function identically
References: #4688
The zap functionality here is in working form, but there is not a
corresponding `brew cask zap` command verb, which is to be supplied
in a separate PR.
Like other forward-compatible DSL extensions, it is intentionally
undocumented.
References: #4688
References: #4688.
For forward-compatibility; intentionally left undocumented.
The `license` stanza is not free-form. There is a limited
set of valid symbols, of which the argument must be a member.
(The set will later be documented, and probably needs amendments.)
Version numbers and variants of licenses are intentionally
ommitted. The use-case for `license` is filtering and listing
of Casks. We want to avoid becoming a detailed repository of
application descriptions: that information can be found at the
`homepage` URL.
- Raise `CaskError` instead of `Plist::ParseError` from module
- Improve error message when parse result is empty
- remove leading garbage text and emit it to stderr (seen in #5060)
- remove trailing garbage text and emit it to stderr (seen in #4819)
This has the incidental effect of emitting DMG licenses during
installation, which seems desirable as permanent functionality.
If not permanent, the warnings to STDERR should still be kept
temporarily to help get better bug reports on `hdiutil`.
A bug wrt DMG licenses must have been introduced in one of
#4892, #4887, #4889, #4900, #4975, #4978, or #4857. Presumably,
the cause is that STDERR was previously silenced when running
`hdiutil`. It would be cleaner (and more reliable) to redirect
STDERR and examine it separately, rather than clean up the
merged outputs.
closes#4819closes#5060
Covering all cases
- external commands as executables
- external commands as Ruby libraries
- built-in command verbs
This is intended as a development aid.
A side benefit is that an external command can be constructed
to use a `run` method, rather than having to accomplish everything
at `require` time.