VSCode Format

pull/102/head
romanitho 2022-06-10 10:26:41 +02:00
parent 8ee90d8e54
commit a7bd127c43
18 changed files with 152 additions and 152 deletions

View File

@ -11,11 +11,9 @@ function Add-ScopeMachine ($SettingsPath) {
$ConfigFile.installBehavior.preferences.scope = "Machine" $ConfigFile.installBehavior.preferences.scope = "Machine"
} }
else { else {
Add-Member -InputObject $ConfigFile -MemberType NoteProperty -Name 'installBehavior' -Value $( $Scope = New-Object PSObject -Property $(@{scope = "Machine" })
New-Object PSObject -Property $(@{preferences = $( $Preference = New-Object PSObject -Property $(@{preferences = $Scope })
New-Object PSObject -Property $(@{scope = "Machine"})) Add-Member -InputObject $ConfigFile -MemberType NoteProperty -Name 'installBehavior' -Value $Preference -Force
})
) -Force
} }
$ConfigFile | ConvertTo-Json | Out-File $SettingsPath -Encoding utf8 -Force $ConfigFile | ConvertTo-Json | Out-File $SettingsPath -Encoding utf8 -Force

View File

@ -2,7 +2,9 @@
#get xml notif config #get xml notif config
[xml]$NotifConf = Get-Content "$env:ProgramData\Winget-AutoUpdate\config\notif.xml" -Encoding UTF8 -ErrorAction SilentlyContinue [xml]$NotifConf = Get-Content "$env:ProgramData\Winget-AutoUpdate\config\notif.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
if (!($NotifConf)) {break} if (!($NotifConf)) {
break
}
#Load Assemblies #Load Assemblies
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null