benhoskings/babushka — pull request #243 by bradfeehan (2012-12-16 04:46:30+00:00)
Title: Allow extracting DmgAssets with EULAs

A DMG image can have an End User Licence Agreement (EULA) attached to it. When mounted, the user is required to accept the EULA before it will be mounted.

When using `hdiutil attach` from the command-line to mount a DMG file, the licence agreement is shown in the terminal using the user's `PAGER`, then a prompt asks the user to confirm their acceptance before the image is mounted. The DmgAsset class uses `hdiutil` but doesn't connect stdin or stdout, so it won't mount the image.

This change pipes a single `y` character and a newline into `hdiutil` to indicate acceptance of the EULA, allowing the image to be mounted.