Merge pull request #102 from Romanitho/VSCode-Format

VSCode Format
pull/105/head
Romain 2022-06-10 10:27:16 +02:00 committed by GitHub
commit c8dde11134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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