aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli/update.rb
blob: 86d02bb55b64f9136e35085c92f593c47551b41f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Hbc
  class CLI
    class Update < Base
      def self.run(*_ignored)
        result = SystemCommand.run(HOMEBREW_BREW_FILE,
                                   args: ["update"])
        # TODO: separating stderr/stdout is undesirable here.
        #       Hbc::SystemCommand should have an option for plain
        #       unbuffered output.
        print result.stdout
        $stderr.print result.stderr
        exit result.exit_status
      end

      def self.help
        "a synonym for 'brew update'"
      end
    end
  end
end