Sha256: cf38ce0aa10904e962b5cd89ec1ae39bf0e5bc157f546159cefc225fa8c4114e

Contents?: true

Size: 486 Bytes

Versions: 1

Compression:

Stored size: 486 Bytes

Contents

module Brewdler::Commands
  class Install
    def self.run
      begin
        Brewdler::Dsl.new(brewfile).process
      rescue Errno::ENOENT => e
        raise "No Brewfile found"
      rescue NameError
        brewfile.split("\n").each do |name|
          name.chomp!
          Brewdler::BrewInstaller.install(name) if name.length > 0 && name !~ /^ *#/
        end
      end
    end

  private

    def self.brewfile
      File.read(Dir['{*,.*}{B,b}rewfile'].first)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brewdler-1.1.0 lib/brewdler/commands/install.rb