Skip to content

Commit

Permalink
Merge pull request #69 from KosherSalt/tickets/modules-4508_version_p…
Browse files Browse the repository at this point in the history
…arameter_fix

(Modules-4508) Fixed error with version parameter
  • Loading branch information
glennsarti authored Mar 24, 2017
2 parents 5725407 + b90bb4f commit 2be3e28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/provider/package/chocolatey.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def install
end

# Add the package version
args << @resource[:name][/\A\S*/] << '-version' << @resource[:ensure]
args << @resource[:name][/\A\S*/] << '--version' << @resource[:ensure]
end

if choco_exe
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/puppet/provider/package/chocolatey_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

it "should use upgrade command with versioned package" do
resource[:ensure] = '1.2.3'
@provider.expects(:chocolatey).with('upgrade', 'chocolatey', '-version', '1.2.3', '-y', nil)
@provider.expects(:chocolatey).with('upgrade', 'chocolatey', '--version', '1.2.3', '-y', nil)

@provider.install
end
Expand Down Expand Up @@ -135,7 +135,7 @@

it "should use update command with versioned package" do
resource[:ensure] = '1.2.3'
@provider.expects(:chocolatey).with('update', 'chocolatey', '-version', '1.2.3', nil)
@provider.expects(:chocolatey).with('update', 'chocolatey', '--version', '1.2.3', nil)

@provider.install
end
Expand Down

0 comments on commit 2be3e28

Please sign in to comment.