From c6c455412fcb2940b26df703e07841dc8e1390a4 Mon Sep 17 00:00:00 2001 From: Dmitry Dementiev Date: Thu, 28 May 2026 18:28:30 +0300 Subject: [PATCH] =?UTF-8?q?fix(chezmoi):=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=20=D0=BF=D1=83=D1=82=D1=8C=20pwsh=20?= =?UTF-8?q?=D0=B2=20=D1=8F=D1=80=D0=BB=D1=8B=D0=BA=D0=B5=20Codex=20Proxy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Зачем: - ярлык ломался после обновления PowerShell из Microsoft Store из-за версионного пути к pwsh.exe. - Что: - добавлено использование стабильного App Execution Alias для pwsh.exe. - сохранен fallback на найденную команду pwsh и имя pwsh.exe. - Проверка: - пересоздан ярлык Codex Proxy и проверено, что TargetPath существует. --- .../.chezmoiscripts/run_30-create-codex-proxy-shortcut.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chezmoi/.chezmoiscripts/run_30-create-codex-proxy-shortcut.ps1 b/chezmoi/.chezmoiscripts/run_30-create-codex-proxy-shortcut.ps1 index 0293587..622ad4b 100644 --- a/chezmoi/.chezmoiscripts/run_30-create-codex-proxy-shortcut.ps1 +++ b/chezmoi/.chezmoiscripts/run_30-create-codex-proxy-shortcut.ps1 @@ -12,8 +12,11 @@ if ([string]::IsNullOrWhiteSpace($ProgramsPath)) { } $ShortcutPath = Join-Path $ProgramsPath 'Codex Proxy.lnk' +$PwshAliasPath = Join-Path $env:LOCALAPPDATA 'Microsoft\WindowsApps\pwsh.exe' $PwshCommand = Get-Command pwsh -ErrorAction SilentlyContinue -if ($null -ne $PwshCommand) { +if (Test-Path -LiteralPath $PwshAliasPath) { + $TargetPath = $PwshAliasPath +} elseif ($null -ne $PwshCommand) { $TargetPath = $PwshCommand.Source } else { $TargetPath = 'pwsh.exe'