Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Tasks/git-clone/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,9 @@ function InstallWinGet {
pwsh.exe -MTA -Command "Set-PSRepository -Name PSGallery -InstallationPolicy Trusted"

# check if the Microsoft.Winget.Client module is installed
$wingetClientPackage = Get-Module -ListAvailable -Name Microsoft.WinGet.Client | Where-Object { $_.Version -ge "1.9.2411" }
$wingetClientPackage = pwsh.exe -Command "Get-Module -ListAvailable -Name Microsoft.WinGet.Client | Where-Object { `$_.Version -ge '1.9.2411' }"
if (!($wingetClientPackage)) {
Write-Host "Installing Microsoft.Winget.Client"
Install-Module Microsoft.WinGet.Client -Scope $PsInstallScope
pwsh.exe -MTA -Command "Install-Module Microsoft.WinGet.Client -Scope $PsInstallScope"
Write-Host "Done Installing Microsoft.Winget.Client"
}
Expand All @@ -163,7 +162,7 @@ function InstallWinGet {
}

# check if the Microsoft.WinGet.Configuration module is installed
$wingetConfigurationPackage = Get-Module -ListAvailable -Name Microsoft.WinGet.Configuration | Where-Object { $_.Version -ge "1.8.1911" }
$wingetConfigurationPackage = pwsh.exe -Command "Get-Module -ListAvailable -Name Microsoft.WinGet.Configuration | Where-Object { `$_.Version -ge '1.8.1911' }"
if (!($wingetConfigurationPackage)) {
Write-Host "Installing Microsoft.WinGet.Configuration"
pwsh.exe -MTA -Command "Install-Module Microsoft.WinGet.Configuration -AllowPrerelease -Scope $PsInstallScope"
Expand Down
9 changes: 4 additions & 5 deletions Tasks/winget/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,18 @@ function InstallWinGet {
pwsh.exe -MTA -Command "Set-PSRepository -Name PSGallery -InstallationPolicy Trusted"

# check if the Microsoft.Winget.Client module is installed
$wingetClientPackage = Get-Module -ListAvailable -Name Microsoft.WinGet.Client | Where-Object { $_.Version -ge "1.9.2411" }
$wingetClientPackage = pwsh.exe -Command "Get-Module -ListAvailable -Name Microsoft.WinGet.Client | Where-Object { `$_.Version -ge '1.9.2411' }"
if (!($wingetClientPackage)) {
Write-Host "Installing Microsoft.Winget.Client -RequiredVersion 1.9.25190"
Install-Module Microsoft.WinGet.Client -Scope $PsInstallScope -RequiredVersion 1.9.25190
pwsh.exe -MTA -Command "Install-Module Microsoft.WinGet.Client -Scope $PsInstallScope -RequiredVersion 1.9.25190"
Write-Host "Installing Microsoft.Winget.Client"
pwsh.exe -MTA -Command "Install-Module Microsoft.WinGet.Client -Scope $PsInstallScope"
Write-Host "Done Installing Microsoft.Winget.Client"
}
else {
Write-Host "Microsoft.Winget.Client is already installed"
}

# check if the Microsoft.WinGet.Configuration module is installed
$wingetConfigurationPackage = Get-Module -ListAvailable -Name Microsoft.WinGet.Configuration | Where-Object { $_.Version -ge "1.8.1911" }
$wingetConfigurationPackage = pwsh.exe -Command "Get-Module -ListAvailable -Name Microsoft.WinGet.Configuration | Where-Object { `$_.Version -ge '1.8.1911' }"
if (!($wingetConfigurationPackage)) {
Write-Host "Installing Microsoft.WinGet.Configuration"
pwsh.exe -MTA -Command "Install-Module Microsoft.WinGet.Configuration -Scope $PsInstallScope"
Expand Down
Loading