fix(update): retain custom config keys
This commit is contained in:
1 parent
71daa05071
commit
17e8be13b7
3 files changed
+58
-25
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user