diff --git a/attributes/default.rb b/attributes/default.rb index 6863f81..b2f8697 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -33,6 +33,7 @@ default['nodejs']['src_url'] = "http://nodejs.org/dist" default['nodejs']['make_threads'] = node['cpu'] ? node['cpu']['total'].to_i : 2 default['nodejs']['check_sha'] = true +default['nodejs']['install_script_path'] = "/usr/local/bin" # Set this to true to install the legacy packages (0.8.x) from ubuntu/debian repositories; default is false (using the latest stable 0.10.x) default['nodejs']['legacy_packages'] = false diff --git a/recipes/install_from_source.rb b/recipes/install_from_source.rb index 710604a..2f40e34 100644 --- a/recipes/install_from_source.rb +++ b/recipes/install_from_source.rb @@ -53,7 +53,7 @@ # OSX doesn't have the attribute so arbitrarily default 2 cwd "/usr/local/src/node-v#{node['nodejs']['version']}" code <<-EOH - PATH="/usr/local/bin:$PATH" + PATH="#{node['nodejs']['install_script_path']}:$PATH" ./configure --prefix=#{node['nodejs']['dir']} && \ make -j #{node['nodejs']['make_threads']} EOH