Skip to content

Commit cf76b92

Browse files
author
Robin Stolpe
committed
Updated with param fix
1 parent 9d056e8 commit cf76b92

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

.src/private/function/Confirm-RSWinGet.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
[string]$WinGet
4141
)
4242

43-
if ($null -eq $WinGet) {
43+
if ($WinGet -eq "No") {
4444
Write-Output = "WinGet is not installed, downloading and installing WinGet..."
4545
}
4646
else {

.src/private/function/Get-RSInstallInfo.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
# Collects everything in pscustomobject to get easier access to the information
5555
[System.Object]$SysInfo = [PSCustomObject]@{
5656
VCLibs = $(Get-AppxPackage -Name "Microsoft.VCLibs.140.00" -AllUsers | Where-Object { $_.Architecture -eq $Arch })
57-
WinGet = $(try { (Get-AppxPackage -Name Microsoft.DesktopAppInstaller).version } catch { $Null })
57+
WinGet = $(try { (Get-AppxPackage -Name Microsoft.DesktopAppInstaller).version } catch { "No" })
5858
VisualCRedistUrl = $VisualCRedistUrl
5959
$VCLibsUrl = $VCLibsUrl
6060
Arch = $Arch

.src/public/function/Update-RSWinSoftware.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
[System.Object]$SysInfo = Get-RSInstallInfo
6767

6868
# If user has choosen to skip the WinGet version don't check, if WinGet is not installed this will install WinGet anyway.
69-
if ($SkipVersionCheck -eq $false -or $null -eq $SysInfo.WinGet) {
70-
Confirm-RSWinGet -GitHubUrl $GitHubUrl -GithubHeaders $GithubHeaders
69+
if ($SkipVersionCheck -eq $false -or $SysInfo.WinGet -eq "No") {
70+
Confirm-RSWinGet -GitHubUrl $GitHubUrl -GithubHeaders $GithubHeaders -WinGet $SysInfo.WinGet
7171
}
7272

7373
# If VCLibs are not installed it will get installed

WinSoftwareUpdate/WinSoftwareUpdate.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ Function Update-RSWinSoftware {
8989
[System.Object]$SysInfo = Get-RSInstallInfo
9090

9191
# If user has choosen to skip the WinGet version don't check, if WinGet is not installed this will install WinGet anyway.
92-
if ($SkipVersionCheck -eq $false -or $null -eq $SysInfo.WinGet) {
93-
Confirm-RSWinGet -GitHubUrl $GitHubUrl -GithubHeaders $GithubHeaders
92+
if ($SkipVersionCheck -eq $false -or $SysInfo.WinGet -eq "No") {
93+
Confirm-RSWinGet -GitHubUrl $GitHubUrl -GithubHeaders $GithubHeaders -WinGet $SysInfo.WinGet
9494
}
9595

9696
# If VCLibs are not installed it will get installed
@@ -143,7 +143,7 @@ Function Confirm-RSWinGet {
143143
[string]$WinGet
144144
)
145145

146-
if ($null -eq $WinGet) {
146+
if ($WinGet -eq "No") {
147147
Write-Output = "WinGet is not installed, downloading and installing WinGet..."
148148
}
149149
else {
@@ -244,7 +244,7 @@ Function Get-RSInstallInfo {
244244
# Collects everything in pscustomobject to get easier access to the information
245245
[System.Object]$SysInfo = [PSCustomObject]@{
246246
VCLibs = $(Get-AppxPackage -Name "Microsoft.VCLibs.140.00" -AllUsers | Where-Object { $_.Architecture -eq $Arch })
247-
WinGet = $(try { (Get-AppxPackage -Name Microsoft.DesktopAppInstaller).version } catch { $Null })
247+
WinGet = $(try { (Get-AppxPackage -Name Microsoft.DesktopAppInstaller).version } catch { "No" })
248248
VisualCRedistUrl = $VisualCRedistUrl
249249
$VCLibsUrl = $VCLibsUrl
250250
Arch = $Arch

0 commit comments

Comments
 (0)