Skip to content

Commit

Permalink
Add ./node_modules/.bin to $PATH
Browse files Browse the repository at this point in the history
travis-ci/travis-cookbooks#786 removed it, but
this broke many Ember-based repositories, so we will reinstate it.

This is meant to be a hot fix, which would be reverted after a new set
of build images are rolled out.
  • Loading branch information
BanzaiMan committed Dec 6, 2016
1 parent 557e408 commit ad811ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/travis/build/script/node_js.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def export

def setup
super
prepend_path './node_modules/.bin'
convert_legacy_nodejs_config
update_nvm
nvm_install
Expand Down Expand Up @@ -212,6 +213,12 @@ def install_yarn
sh.echo "Setting up \\$PATH", ansi: :green
sh.export "PATH", "$HOME/.yarn/bin:$PATH"
end

def prepend_path(path)
sh.if "$(echo :$PATH: | grep -v :#{path}:)" do
sh.export "PATH", "#{path}:$PATH", echo: true
end
end
end
end
end
Expand Down

0 comments on commit ad811ed

Please sign in to comment.