Skip to content

Conversation

@DavidObando
Copy link
Member

Whenever we run winget commandlets in our scripts, we always run them under powershell 7 (pwsh.exe) given its broader compatibility. However, during the installation of winget modules, we sometimes evaluate if the modules are installed under powershell 5 instead of the desired target of powershell 7. This diff fixes it to always target powershell 7.

Whenever we run winget commandlets in our scripts, we always run them under powershell 7 (pwsh.exe) given its broader compatibility. However, during the installation of winget modules, we sometimes evaluate if the modules are installed under powershell 5 instead of the desired target of powershell 7. This diff fixes it to always target powershell 7.
@DavidObando DavidObando requested a review from Copilot May 7, 2025 21:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the installation process of winget modules by ensuring that all commands run under PowerShell 7 (pwsh.exe) rather than PowerShell 5.

  • Retrieve module information using pwsh.exe -Command to enforce the correct PowerShell version.
  • Remove explicit required version parameters from installation commands.
  • Add the -AllowPrerelease flag for the Microsoft.WinGet.Configuration module installation in the git-clone script.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
Tasks/winget/main.ps1 Updated module retrieval and installation commands to always use pwsh.exe and removed version requirements.
Tasks/git-clone/main.ps1 Updated module retrieval and installation commands, including the addition of the -AllowPrerelease flag for configuration.

@microsoft microsoft deleted a comment from Copilot AI May 7, 2025
@microsoft microsoft deleted a comment from Copilot AI May 7, 2025
@microsoft microsoft deleted a comment from Copilot AI May 7, 2025
@microsoft microsoft deleted a comment from Copilot AI May 7, 2025
@DavidObando DavidObando merged commit bca291e into main May 7, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants