Skip to content

Commit

Permalink
Do not perform parameters escaping for nssm 3.0.1
Browse files Browse the repository at this point in the history
nssm cookbook 3.0.1 introduced a breaking change dhoer/chef-nssm/#17
The nssm resource is now performing parameter escaping.

Helpers libraries shouldn't try to also escape parameters.
  • Loading branch information
Annih committed Jul 17, 2017
1 parent a552ae7 commit 3c9173b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def data_path

def command(config_file, config_dir)
if windows?
%(agent -config-file="""#{config_file}""" -config-dir="""#{config_dir}""")
%{agent -config-file="#{config_file}" -config-dir="#{config_dir}"}
else
"/usr/local/bin/consul agent -config-file=#{config_file} -config-dir=#{config_dir}"
end
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
supports 'windows'

depends 'build-essential'
depends 'nssm'
depends 'nssm', '>= 3.0.1'
depends 'golang'
depends 'poise', '~> 2.2'
depends 'poise-archive', '~> 1.3'
Expand Down
4 changes: 2 additions & 2 deletions test/spec/libraries/consul_service_windows_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

it do
expect(chef_run).to install_nssm('consul').with(
program: 'C:\Program Files\consul\0.8.3\consul.exe',
args: 'agent -config-file="""C:\Program Files\consul\consul.json""" -config-dir="""C:\Program Files\consul\conf.d"""'
program: 'C:\Program Files\consul\0.7.1\consul.exe',
args: 'agent -config-file="C:\Program Files\consul\consul.json" -config-dir="C:\Program Files\consul\conf.d"'
)
end
end
Expand Down

0 comments on commit 3c9173b

Please sign in to comment.