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

ensure more informative errors from dmg.rb #4887

Merged
merged 1 commit into from Jun 14, 2014

Conversation

rolandwalker
Copy link
Contributor

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

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: Homebrew#4857
rolandwalker added a commit that referenced this pull request Jun 14, 2014
ensure more informative errors from `dmg.rb`
@rolandwalker rolandwalker merged commit c78c108 into Homebrew:master Jun 14, 2014
@rolandwalker rolandwalker deleted the better_dmg_errors branch June 14, 2014 22:15
rolandwalker added a commit to rolandwalker/homebrew-cask that referenced this pull request Jun 15, 2014
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 (Homebrew#4857).

After Homebrew#4892 and Homebrew#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`.
rolandwalker added a commit to rolandwalker/homebrew-cask that referenced this pull request Jun 25, 2014
- 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 Homebrew#5060)
- remove trailing garbage text and emit it to stderr (seen in Homebrew#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
Homebrew#4892, Homebrew#4887, Homebrew#4889, Homebrew#4900, Homebrew#4975, Homebrew#4978, or Homebrew#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 Homebrew#4819
closes Homebrew#5060
@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.

None yet

1 participant