ignore non-XML hdiutil output preceding plists

unless `--debug` is in effect.  This reverts to previous
behavior WRT DMG licenses.  Trailing non-XML garbage will
still be emitted.
This commit is contained in:
Roland Walker 2014-07-14 13:05:34 -04:00
parent df249053e1
commit d9d3011c81
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class Cask::SystemCommand
begin
raise CaskError.new("Empty plist input") unless output =~ %r{\S}
output.sub!(%r{\A(.*?)(<\?\s*xml)}m, '\2')
_warn_plist_garbage(command, $1)
_warn_plist_garbage(command, $1) if Cask.debug
output.sub!(%r{(<\s*/\s*plist\s*>)(.*?)\Z}m, '\1')
_warn_plist_garbage(command, $2)
xml = Plist::parse_xml(output)