fix(update): retain custom config keys

This commit is contained in:
Julian lechner committed 2026-09-30 09:27:48 +02:00
1 parent 71daa05071
commit 17e8be13b7
3 files changed
+58 -25

No files matched your search

+2 -1
View File
@@ -112,7 +112,8 @@ function Sync-ManagedDestination {
$newBytes = [System.IO.File]::ReadAllBytes($_.FullName)
}
if ($relative -eq 'config.toml' -and (Test-Path -LiteralPath $target)) {
$content = [System.Text.Encoding]::UTF8.GetString($newBytes) | & python (Join-Path $PSScriptRoot 'install-options.py') merge-toml --current $target | Out-String
$statusLineFlag = if ($StatusLineEnabled) { 'true' } else { 'false' }
$content = [System.Text.Encoding]::UTF8.GetString($newBytes) | & python (Join-Path $PSScriptRoot 'install-options.py') merge-toml --current $target --statusline $statusLineFlag | Out-String
if ($LASTEXITCODE -ne 0) { throw 'Could not merge managed config.toml keys.' }
$newBytes = [System.Text.Encoding]::UTF8.GetBytes($content)
}