Skip to content

Commit 0e54c91

Browse files
bryanwbjtimberman
authored and
jtimberman
committed
fix glob in java cookbook for matching installation directory of openjdk
1 parent ddc2a9c commit 0e54c91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

recipes/openjdk.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
require "fileutils"
4545
arch = node['kernel']['machine'] =~ /x86_64/ ? "x86_64" : "i386"
4646
Chef::Log.debug("glob is #{java_home_parent}/java*#{version}*openjdk*")
47-
jdk_home = Dir.glob("#{java_home_parent}/java*#{version}*openjdk?{,#{arch}}")[0]
47+
jdk_home = Dir.glob("#{java_home_parent}/java*#{version}*openjdk{,-#{arch}}")[0]
4848
Chef::Log.debug("jdk_home is #{jdk_home}")
4949
# delete the symlink if it already exists
5050
if File.exists? java_home

0 commit comments

Comments
 (0)