diff --git a/manifests/install/windows.pp b/manifests/install/windows.pp index 2dd2ca51..f88b668c 100644 --- a/manifests/install/windows.pp +++ b/manifests/install/windows.pp @@ -109,7 +109,7 @@ -NoProfile \ -NoLogo \ -NonInteractive \ - -Command {\$CurrentVersion = [string](facter.bat -p aio_agent_version); \ + -Command {\$CurrentVersion = [string](facter.bat aio_agent_version); \ if (\$CurrentVersion -eq '${::puppet_agent::_expected_package_version}') { \ exit 0; \ } \ diff --git a/spec/classes/puppet_agent_windows_install_spec.rb b/spec/classes/puppet_agent_windows_install_spec.rb index 2110da9a..3f0c0eb0 100644 --- a/spec/classes/puppet_agent_windows_install_spec.rb +++ b/spec/classes/puppet_agent_windows_install_spec.rb @@ -82,7 +82,7 @@ {:package_version => '5.6.7'}) } it { - is_expected.to contain_exec('install_puppet.ps1').with_unless(/\-Command {\$CurrentVersion = \[string\]\(facter.bat \-p aio_agent_version\);/) + is_expected.to contain_exec('install_puppet.ps1').with_unless(/\-Command {\$CurrentVersion = \[string\]\(facter.bat aio_agent_version\);/) is_expected.to contain_exec('install_puppet.ps1').with_unless(/\-Command.*if \(\$CurrentVersion \-eq '5\.6\.7'\) { +exit 0; *} *exit 1; }\.Invoke\(\)/) } end