From df5390c31e64ab46a65808de2b358036db1c1bcd Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Mon, 6 Jan 2025 00:23:26 +0000 Subject: [PATCH] Accept winget package agreements --- library/win_winget.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/win_winget.ps1 b/library/win_winget.ps1 index 2520a6a..6c4909f 100644 --- a/library/win_winget.ps1 +++ b/library/win_winget.ps1 @@ -67,7 +67,7 @@ foreach ($name in $names) { "latest" { if (Test-UpgradeAvailable) { - $command = "`"$winget`" install `"$name`"" + $command = "`"$winget`" install --accept-package-agreements `"$name`"" $result = Run-Command -command $command if ($result.rc -ne 0) { $module.Result.rc = $result.rc @@ -81,7 +81,7 @@ foreach ($name in $names) { "present" { if (!(Test-Installed)) { - $command = "`"$winget`" install `"$name`"" + $command = "`"$winget`" install --accept-package-agreements `"$name`"" $result = Run-Command -command $command if ($result.rc -ne 0) { $module.Result.rc = $result.rc