java_certificate resource fails when node['java']['java_home'] or the java_home property contain spaces.
:pancakes: Cookbook version
4.3.0
:woman_cook: Chef-Infra Version
14.14.29
:tophat: Platform details
Windows Server 2012 R2
Steps To Reproduce
Steps to reproduce the behavior:
Given an existing OpenJDK installation at a path that contains spaces, e.g. C:\Program Files\OpenJDK\jdk-11.0.5+10-jre
Define a java_certificate resource with a java_home path value that contains spaces:
java_certificate 'myrootca' do
cert_data cert
java_home 'C:/Program Files/OpenJDK/jdk-11.0.5+10-jre'
keystore_path java_cacerts_path
end
Then it fails on converge:
* java_certificate[myrootca] action install[2020-01-15T00:10:04+00:00] INFO: Processing java_certificate[myrootca] action install
[2020-01-15T00:10:04+00:00] DEBUG: ---- Begin output of C:/Program Files/OpenJDK/jdk-11.0.5+10-jre/bin/keytool -list -keystore C:\Program Files\OpenJDK\jdk-11.0.5+10-jre/lib/security/cacerts -storepass changeit -v ----
STDOUT:
STDERR: 'C:/Program' is not recognized as an internal or external command, operable program or batch file.
---- End output ...
Resource will converge successfully when changing java_home to a path without spaces, e.g. C:/OpenJDK/jdk-11.0.5+10-jre
:police_car: Expected behavior
java_certificate does not fail when node['java']['java_home'] or java_home property contain spaces in the path.
If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help!
:ghost: Brief Description
java_certificate
resource fails whennode['java']['java_home']
or thejava_home
property contain spaces.:pancakes: Cookbook version
4.3.0
:woman_cook: Chef-Infra Version
14.14.29
:tophat: Platform details
Windows Server 2012 R2
Steps To Reproduce
Steps to reproduce the behavior:
Given an existing OpenJDK installation at a path that contains spaces, e.g.
C:\Program Files\OpenJDK\jdk-11.0.5+10-jre
Define a
java_certificate
resource with ajava_home
path value that contains spaces:Then it fails on converge:
Resource will converge successfully when changing
java_home
to a path without spaces, e.g.C:/OpenJDK/jdk-11.0.5+10-jre
:police_car: Expected behavior
java_certificate
does not fail whennode['java']['java_home']
orjava_home
property contain spaces in the path.