lib/xcode/install/install.rb in xcode-install-0.0.1 vs lib/xcode/install/install.rb in xcode-install-0.0.2

- old
+ new

@@ -1,16 +1,6 @@ module XcodeInstall - class PlainInformative < StandardError - include CLAide::InformativeError - end - - class Informative < PlainInformative - def message - "[!] #{super}".red - end - end - class Command class Install < Command self.command = 'install' self.summary = 'Install a specific version of Xcode.' @@ -22,9 +12,10 @@ @installer = Installer.new @version = argv.shift_argument end def validate! + raise Informative, "Version #{@version} already installed." if @installer.installed?(@version) raise Informative, "Version #{@version} doesn't exist." unless @installer.exist?(@version) end def run dmgPath = @installer.download(@version) \ No newline at end of file