diff --git a/libraries/helpers.rb b/libraries/helpers.rb index 44910400..aacc1a54 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -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 diff --git a/metadata.rb b/metadata.rb index 8f3a8f25..d7a7bae3 100644 --- a/metadata.rb +++ b/metadata.rb @@ -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' diff --git a/test/spec/libraries/consul_service_windows_spec.rb b/test/spec/libraries/consul_service_windows_spec.rb index f4a0c6e2..39a2358a 100644 --- a/test/spec/libraries/consul_service_windows_spec.rb +++ b/test/spec/libraries/consul_service_windows_spec.rb @@ -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