Skip to content

Commit

Permalink
Fix "Winget not found" error in Windows Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-revay committed Mar 9, 2024
1 parent f964745 commit c9e7ef3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Windows_10/packages_install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ $WINGET_PACKAGES = @(
'Doist.Todoist'
)

# refresh Path variable (in case Winget was just installed now)
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")

$WINGET_PACKAGES | ForEach-Object {
echo "### Winget is installing a package: $PSItem"
winget install --accept-source-agreements --accept-package-agreements `
Expand Down

0 comments on commit c9e7ef3

Please sign in to comment.