From 3e7f94d5b54799db72917b9c2d99f3e592c892a1 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 6 Mar 2017 11:39:07 +0100 Subject: [PATCH] Move `cask` to `cmd/`. --- Library/Homebrew/brew.rb | 3 --- Library/Homebrew/cask/cmd/brew-cask.rb | 12 ------------ Library/Homebrew/cmd/cask.rb | 10 ++++++++++ 3 files changed, 10 insertions(+), 15 deletions(-) delete mode 100755 Library/Homebrew/cask/cmd/brew-cask.rb create mode 100644 Library/Homebrew/cmd/cask.rb diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index ba43e65c4e..aa38b54f4d 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -53,9 +53,6 @@ begin ENV["PATH"] += "#{File::PATH_SEPARATOR}#{tap_cmd_dir}" end - # Add cask commands to PATH. - ENV["PATH"] += "#{File::PATH_SEPARATOR}#{HOMEBREW_LIBRARY}/Homebrew/cask/cmd" - # Add SCM wrappers. ENV["PATH"] += "#{File::PATH_SEPARATOR}#{HOMEBREW_SHIMS_PATH}/scm" diff --git a/Library/Homebrew/cask/cmd/brew-cask.rb b/Library/Homebrew/cask/cmd/brew-cask.rb deleted file mode 100755 index 825c4cb818..0000000000 --- a/Library/Homebrew/cask/cmd/brew-cask.rb +++ /dev/null @@ -1,12 +0,0 @@ -require "pathname" - -$LOAD_PATH.unshift(File.expand_path("../../lib", Pathname.new(__FILE__).realpath)) - -require "hbc" - -begin - Hbc::CLI.process(ARGV) -rescue Interrupt - puts - exit 130 -end diff --git a/Library/Homebrew/cmd/cask.rb b/Library/Homebrew/cmd/cask.rb new file mode 100644 index 0000000000..8a68b8d9a7 --- /dev/null +++ b/Library/Homebrew/cmd/cask.rb @@ -0,0 +1,10 @@ +$LOAD_PATH.unshift("#{HOMEBREW_LIBRARY_PATH}/cask/lib") +require "hbc" + +module Homebrew + module_function + + def cask + Hbc::CLI.process(ARGV) + end +end