Class: Homebrew::Cmd::Unpin

Inherits:
AbstractCommand show all
Defined in:
cmd/unpin.rb

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#runvoid

This method returns an undefined value.



20
21
22
23
24
25
26
27
28
29
30
# File 'cmd/unpin.rb', line 20

def run
  args.named.to_resolved_formulae.each do |f|
    if f.pinned?
      f.unpin
    elsif !f.pinnable?
      onoe "#{f.name} not installed"
    else
      opoo "#{f.name} not pinned"
    end
  end
end