Improve error message for AIR app reinstallation

Adobe AIR Installer forbids the silent reinstallation of existing AIR
apps; any attempt fails with exit code 9.

In the absence of known workarounds, we merely wrap the failure in a
clearer error message.
This commit is contained in:
ndr 2015-01-04 11:33:13 +00:00
parent 3190cb80d7
commit 83bf761588
1 changed files with 6 additions and 2 deletions

View File

@ -25,7 +25,11 @@ class Hbc::Container::Air < Hbc::Container::Base
end
def extract
@command.run!(self.class.installer_cmd,
:args => ['-silent', '-location', @cask.staged_path, Pathname.new(@path).realpath])
install = @command.run(self.class.installer_cmd,
:args => ['-silent', '-location', @cask.staged_path, Pathname.new(@path).realpath])
if install.exit_status == 9 then
raise Hbc::CaskError.new "Adobe AIR application #{@cask} already exists on the system, and cannot be reinstalled."
end
end
end