# File lib/puppet/module/tool/applications/installer.rb, line 36
      def run
        case @source
        when :repository
          if match['file']
            begin
              cache_path = repository.retrieve(match['file'])
            rescue OpenURI::HTTPError => e
              abort "Could not install module: #{e.message}"
            end
            Unpacker.run(cache_path, Dir.pwd, options)
          else
            abort "Malformed response from module repository."
          end
        when :filesystem
          repository = Repository.new('file:///')
          uri = URI.parse("file://#{File.expand_path(@filename)}")
          cache_path = repository.retrieve(uri)
          Unpacker.run(cache_path, Dir.pwd, options)
        else
          abort "Could not determine installation source"
        end
      end