Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

finetune the not_if condition to check if the node binary exists as s…

…uggested by @cactus in #3
  • Loading branch information...
commit a764bdbcd257f2c3bb72a2aa9616cefa62dd4165 1 parent 0af3348
@mdxp authored
Showing with 7 additions and 6 deletions.
  1. +3 −3 attributes/default.rb
  2. +1 −1  metadata.rb
  3. +3 −2 recipes/default.rb
View
6 attributes/default.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-default.nodejs[:version] = "0.6.8"
-default.nodejs[:checksum] = "e6cbfc5ccdbe10128dbbd4dc7a88c154d80f8a39c3a8477092cf7d25eef78c9c"
+default.nodejs[:version] = "0.6.11"
+default.nodejs[:checksum] = "94bbdb2d62645fd2ad5b96e41cfec68abf004fd03fabaaf7d71c48b39013cbd1"
default.nodejs[:dir] = "/usr/local"
-default.nodejs[:npm] = "1.0.105"
+default.nodejs[:npm] = "1.1.2"
View
2  metadata.rb
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Installs/Configures nodejs"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
-version "0.6.8"
+version "0.6.11"
recipe "nodejs", "Installs Node.JS from source"
recipe "nodejs::npm", "Installs npm - a package manager for node"
View
5 recipes/default.rb
@@ -56,7 +56,8 @@
creates "/usr/local/src/node-v#{node[:nodejs][:version]}/node"
end
-execute "make install" do
+execute "nodejs make install" do
+ command "make install"
cwd "/usr/local/src/node-v#{node[:nodejs][:version]}"
- not_if { `#{node[:nodejs][:dir]}/bin/node --version`.chomp == "v#{node[:nodejs][:version]}" }
+ not_if {File.exists?("#{node[:nodejs][:dir]}/bin/node") && `#{node[:nodejs][:dir]}/bin/node --version`.chomp == "v#{node[:nodejs][:version]}" }
end
Please sign in to comment.
Something went wrong with that request. Please try again.