win_chocolatey: Ensure chocolatey to fail (#26416)

Currently chocolatey is not failing when the user requests version X,
but version X is not available in the repository.

Obviously the module should fail in this case.

This fixes #25393
pull/26430/head
Dag Wieers 7 years ago committed by Jordan Borean
parent 8e9d04043a
commit b9d018885a

@ -157,7 +157,7 @@ Function Choco-Upgrade
throw "$package is not installed, you cannot upgrade"
}
$cmd = "$executable upgrade -dv -y $package -timeout $timeout"
$cmd = "$executable upgrade -dv -y $package -timeout $timeout --failonunfound"
if ($check_mode)
{
@ -269,7 +269,7 @@ Function Choco-Install
}
}
$cmd = "$executable install -dv -y $package -timeout $timeout"
$cmd = "$executable install -dv -y $package -timeout $timeout --failonunfound"
if ($check_mode)
{

Loading…
Cancel
Save