From 4e8954415b867006b9ceba2c503410a9f11f7acd Mon Sep 17 00:00:00 2001 From: Andrzej Demski <75534654+AndrewDemski-ad-gmail-com@users.noreply.github.com> Date: Fri, 17 Nov 2023 18:05:27 +0100 Subject: [PATCH] Update Add-ScopeMachine.ps1 There is a bug which breaks mode complex configurations in userSettingsFile (C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WinGet\Settings\defaultState\settings.json" --- Winget-AutoUpdate/functions/Add-ScopeMachine.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/functions/Add-ScopeMachine.ps1 b/Winget-AutoUpdate/functions/Add-ScopeMachine.ps1 index 44bb7e4..0cf6145 100644 --- a/Winget-AutoUpdate/functions/Add-ScopeMachine.ps1 +++ b/Winget-AutoUpdate/functions/Add-ScopeMachine.ps1 @@ -15,6 +15,6 @@ function Add-ScopeMachine ($SettingsPath) { $Preference = New-Object PSObject -Property $(@{preferences = $Scope }) Add-Member -InputObject $ConfigFile -MemberType NoteProperty -Name 'installBehavior' -Value $Preference -Force } - $ConfigFile | ConvertTo-Json | Out-File $SettingsPath -Encoding utf8 -Force + $ConfigFile | ConvertTo-Json -Depth 100 | Out-File $SettingsPath -Encoding utf8 -Force }