aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-03-06 11:39:07 +0100
committerMarkus Reiter2017-03-06 11:41:29 +0100
commit3e7f94d5b54799db72917b9c2d99f3e592c892a1 (patch)
treebb69c78ccbad901a107342d1c7078ac37458a824
parent29f431e85eedfeed7a44fc0300bd5797c481bfe0 (diff)
downloadbrew-3e7f94d5b54799db72917b9c2d99f3e592c892a1.tar.bz2
Move `cask` to `cmd/`.
-rw-r--r--Library/Homebrew/brew.rb3
-rwxr-xr-xLibrary/Homebrew/cask/cmd/brew-cask.rb12
-rw-r--r--Library/Homebrew/cmd/cask.rb10
3 files changed, 10 insertions, 15 deletions
diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb
index ba43e65c4..aa38b54f4 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 825c4cb81..000000000
--- 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 000000000..8a68b8d9a
--- /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