diff --git a/Formula/nvm.rb b/Formula/nvm.rb index b71f68f712..b34b78b5e5 100644 --- a/Formula/nvm.rb +++ b/Formula/nvm.rb @@ -4,9 +4,19 @@ class Nvm < Formula sha256 "0583b948f519efaa8fbabd630fae86e2d919c32173fba9ed0db4fcba4640de97" head "https://github.com/creationix/nvm.git" + resource "nvm-exec" do + url "https://raw.githubusercontent.com/creationix/nvm/v0.24.1/nvm-exec" + sha256 "915118c666c6f3e03ce4a4545038ecae691c7c496579c614f4d32200a180924c" + end + def install prefix.install "nvm.sh" bash_completion.install "bash_completion" => "nvm" + + resource("nvm-exec").stage do + prefix.install("nvm-exec") + chmod 0755, "#{prefix}/nvm-exec" + end end def caveats; <<-EOS.undent @@ -14,6 +24,10 @@ class Nvm < Formula mkdir ~/.nvm + Copy nvm-exec to NVM's working directory + + cp $(brew --prefix nvm)/nvm-exec ~/.nvm/ + Add the following to $HOME/.bashrc, $HOME/.zshrc, or your shell's equivalent configuration file: