From 6c183356aaa3c1135078883835fc757faa74a32b Mon Sep 17 00:00:00 2001 From: Dmitrii Date: Sun, 22 Mar 2026 20:13:52 +0300 Subject: [PATCH] =?UTF-8?q?fix(chezmoi):=20utf8BOM=20=D0=BD=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=B8=D0=B2=D0=B0=D0=B5?= =?UTF-8?q?=D1=82=D1=81=D1=8F=20=D0=B2=20PS=205.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Зачем: - chezmoi запускает скрипт через PS 5.1, где допустимы только UTF8/Unicode/ASCII и т.д., но не utf8BOM (появился в PS 7). - Что: - заменено -Encoding utf8BOM на -Encoding UTF8 (в PS 5.1 пишет с BOM). - Проверка: - chezmoi -S "$HOME\dotfiles\chezmoi" apply (на Windows с PS 5.1) Co-Authored-By: Claude Opus 4.6 (1M context) --- chezmoi/.chezmoiscripts/run_20-configure-windows-terminal.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chezmoi/.chezmoiscripts/run_20-configure-windows-terminal.ps1 b/chezmoi/.chezmoiscripts/run_20-configure-windows-terminal.ps1 index 5ea0cd7..6601bc7 100644 --- a/chezmoi/.chezmoiscripts/run_20-configure-windows-terminal.ps1 +++ b/chezmoi/.chezmoiscripts/run_20-configure-windows-terminal.ps1 @@ -234,6 +234,6 @@ if (-not $Changed) { $BackupPath = '{0}.bak-{1}' -f $SettingsPath, (Get-Date -Format 'yyyyMMdd-HHmmss') Copy-Item -LiteralPath $SettingsPath -Destination $BackupPath -Force -$Settings | ConvertTo-Json -Depth 100 | Set-Content -LiteralPath $SettingsPath -Encoding utf8BOM +$Settings | ConvertTo-Json -Depth 100 | Set-Content -LiteralPath $SettingsPath -Encoding UTF8 Write-Host "Windows Terminal: updated $SettingsPath" Write-Host "Backup: $BackupPath"