nstead, determine success by directly testing the intended effect:
does the mount path still exist?
Also:
- retry once on failure.
- silent success if the given mount point did not exist.
These changes are intended to help with unpredictable problems with
the test suite that manifest frequently on Travis.
References: #4975, #4900, #4857
Because backtick has a different meaning in the shell, and the user
may copy-and-paste such text.
Some light re-wording included as well, and a reference to "brew cask edit"
changed to "brew cask cat" for simplicity.
Mysterious `hdiutil` errors are a longtime problem with the
test suite, and the largest cause of false Travis failure
reports.
What appears to happen is that `hdiutil` returns a valid
plist output, but also exits with an error code.
Recently, user errors have been reported which seem to be
related to the same problem (#4857).
After #4892 and #4887, we have have more assurances that mount errors
will be caught elsewhere, if the XML is incorrect/missing, or if the
mounts are not returned.
So, for this special case, it should be safe to simply
ignore the error code from `hdiutil`.
This may not be strictly necessary. But it should help track
down the `hdiutil` errors, which are persistent, but occasional,
and hard to reproduce. (We pass a flag to `hdiutil` to make
respond in XML.)
The logic for better errors was already there; this just makes
sure that another exceptional case is handled, and falls through
to the existing error-check.
References: #4857
Including the case where a Cask is already installed.
Always continue installing when multiple Casks are specified,
only raising an exception at the end of the command (if some
portion of the attempted install actions failed). Never
exit with an error code if "already installed" was the only
problem seen during the run.
Also tweak error messages.
Fixes#1347, #2677, #4785
Required disabling two tests regarding suggestions on Cask
spelling errors.
before invoking `each` method. This is necessitated by Homebrew's
switch to Ruby 2.0.
Also standardize how all `uninstall` directives are coerced to Array,
in a way that is compatible between Ruby 1.8 and 2.0.
Fixes#4784.
Fixes#4677. This change is necessitated by Homebrew's recent
switch to Ruby 2.x. These changes may be incomplete and/or
may not work well with Ruby 1.8. Travis should test Ruby 1.8
compatibility.