Accept winget package agreements

This commit is contained in:
Kenneth Benzie 2025-01-06 00:23:26 +00:00
parent 5eb6570617
commit df5390c31e

View File

@ -67,7 +67,7 @@ foreach ($name in $names) {
"latest" { "latest" {
if (Test-UpgradeAvailable) { if (Test-UpgradeAvailable) {
$command = "`"$winget`" install `"$name`"" $command = "`"$winget`" install --accept-package-agreements `"$name`""
$result = Run-Command -command $command $result = Run-Command -command $command
if ($result.rc -ne 0) { if ($result.rc -ne 0) {
$module.Result.rc = $result.rc $module.Result.rc = $result.rc
@ -81,7 +81,7 @@ foreach ($name in $names) {
"present" { "present" {
if (!(Test-Installed)) { if (!(Test-Installed)) {
$command = "`"$winget`" install `"$name`"" $command = "`"$winget`" install --accept-package-agreements `"$name`""
$result = Run-Command -command $command $result = Run-Command -command $command
if ($result.rc -ne 0) { if ($result.rc -ne 0) {
$module.Result.rc = $result.rc $module.Result.rc = $result.rc