Skip to content

Commit 3fadd9e

Browse files
author
jtimberman
committed
[COOK-858] - fix regex to find arch on centos6, too
1 parent ad91249 commit 3fadd9e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ By default, the extracted directory is extracted to app_root/extracted_dir_name
124124
bin_cmds ["mvn"]
125125
action :install
126126
end
127-
128-
127+
128+
129129

130130
---
131131
Usage
132132
=====
133133

134-
Simply include the `java` recipe where ever you would like Java installed.
134+
Simply include the `java` recipe where ever you would like Java installed.
135135

136136
To install Oracle flavored Java on Debian or Ubuntu override the `node['java']['install_flavor']` attribute with in role:
137137

recipes/openjdk.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
require "fileutils"
5454
arch = node['kernel']['machine'] =~ /x86_64/ ? "x86_64" : "i386"
5555
Chef::Log.debug("glob is #{java_home_parent}/java*#{version}*openjdk*")
56-
jdk_home = Dir.glob("#{java_home_parent}/java*#{version}*openjdk{,-#{arch}}")[0]
56+
jdk_home = Dir.glob("#{java_home_parent}/java*#{version}*openjdk{,[-\.]#{arch}}")[0]
5757
Chef::Log.debug("jdk_home is #{jdk_home}")
5858
# delete the symlink if it already exists
5959
if File.exists? java_home

0 commit comments

Comments
 (0)