Skip to content

Commit

Permalink
fix glob in java cookbook for matching installation directory of openjdk
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanwb authored and jtimberman committed Feb 14, 2012
1 parent f72c727 commit ea60707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/recipes/openjdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
require "fileutils"
arch = node['kernel']['machine'] =~ /x86_64/ ? "x86_64" : "i386"
Chef::Log.debug("glob is #{java_home_parent}/java*#{version}*openjdk*")
jdk_home = Dir.glob("#{java_home_parent}/java*#{version}*openjdk?{,#{arch}}")[0]
jdk_home = Dir.glob("#{java_home_parent}/java*#{version}*openjdk{,-#{arch}}")[0]
Chef::Log.debug("jdk_home is #{jdk_home}")
# delete the symlink if it already exists
if File.exists? java_home
Expand Down

0 comments on commit ea60707

Please sign in to comment.