Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><code>brew cask install</code> was working earlier in the day, so I hoping that it was just a change in the load path affected the shell's ability to find and run the <code>brew cask install</code> command.</p> <p>So, I did an exhaustive search:</p> <pre><code>$ find / \( -name "brew\-cask*" -type f \) -or \( -ilname "*brew-cask*" \) 2&gt;/dev/null | grep brew-cask | xargs ls -l -rw-r--r-- 1 lex admin 0 Sep 1 16:42 /Library/Caches/Homebrew/Formula/brew-cask.brewing -rwxr-xr-x 1 lex admin 193 Aug 31 20:35 /Library/Caches/Homebrew/brew-cask--git/bin/brew-cask.rb -rw-r--r-- 1 lex admin 470 Aug 31 20:35 /Library/Caches/Homebrew/brew-cask--git/brew-cask.rb -rwxr-xr-x 1 lex wheel 197 Sep 1 16:39 /usr/local/Cellar/brew-cask/0.15.0/bin/brew-cask.rb lrwxr-xr-x 1 lex admin 32 Aug 31 20:35 /usr/local/Library/Formula/brew-cask.rb -&gt; ../Taps/phinze-cask/brew-cask.rb lrwxr-xr-x 1 lex admin 29 Sep 1 16:39 /usr/local/Library/LinkedKegs/brew-cask -&gt; ../../Cellar/brew-cask/0.15.0 -rwxr-xr-x 1 lex admin 193 Aug 31 20:35 /usr/local/Library/Taps/phinze-cask/bin/brew-cask.rb -rw-r--r-- 1 lex admin 470 Aug 31 20:35 /usr/local/Library/Taps/phinze-cask/brew-cask.rb lrwxr-xr-x 1 lex admin 43 Sep 1 16:39 /usr/local/bin/brew-cask.rb -&gt; ../Cellar/brew-cask/0.15.0/bin/brew-cask.rb lrwxr-xr-x 1 lex admin 26 Sep 1 16:39 /usr/local/opt/brew-cask -&gt; ../Cellar/brew-cask/0.15.0 </code></pre> <p>The last two lines looked interesting...</p> <pre><code>$ ls -l /usr/local/Cellar/brew-cask/0.15.0/bin/brew-cask.rb -rwxr-xr-x 1 lex wheel 197 Sep 1 16:39 /usr/local/Cellar/brew-cask/0.15.0/bin/brew-cask.rb $ ls -l /usr/local/Cellar/brew-cask/0.15.0 total 16 drwxr-xr-x 421 lex wheel 14314 Sep 1 16:39 Casks -rw-r--r-- 1 lex admin 226 Sep 1 16:39 INSTALL_RECEIPT.json -rw-r--r-- 1 lex wheel 1909 Sep 1 16:39 README.md drwxr-xr-x 3 lex wheel 102 Sep 1 16:39 bin drwxr-xr-x 5 lex wheel 170 Sep 1 16:39 rubylib </code></pre> <p>Hmmm... <code>/usr/local/opt/brew-cask</code> points to a directory that contains a bin directory that then contains brew-cask...</p> <p>Then, I looked in at my load path...</p> <pre><code>$ echo $PATH /Users/lex/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/coreutils/libexec/gnubin:/Users/lex/.rbenv/bin:/Users/lex/.rbenv/shims:/Users/lex/bin:/usr/local/opt:/usr/local/bin:/usr/bin </code></pre> <p>And sure enough, my PATH had been changed to load files in <code>/usr/local/opt</code> before it loads files in /usr/local/bin.</p> <p>The rest of the "executables" were similar in the <code>/usr/local/opt</code> directory. So, I removed it from my path.</p> <p>I tried again...</p> <pre><code>$ brew cask install sublime-text ==&gt; Downloading http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.dmg ######################################################################## 100.0% ==&gt; Success! sublime-text installed to /opt/homebrew-cask/Caskroom/sublime-text/2.0.2 ==&gt; Linking Sublime Text 2.app to /Users/lex/Applications/Sublime Text 2.app </code></pre> <p>Success :-)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload