From e64c48cdfdbe89208c95c22c3ba390ed08dc0a26 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sun, 23 Aug 2026 13:33:00 +0300 Subject: [PATCH] =?UTF-8?q?fix(db-repo):=20=D0=BF=D0=BE=D0=BB=D0=BD=D0=B0?= =?UTF-8?q?=D1=8F=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=20=D0=B2=D1=8B=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=20=D0=B2=20=D0=BA=D0=B0=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=D0=B4=D0=B5=20=E2=80=94=20=D0=BA=D0=BE=D1=80=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BB=D0=BE=D0=BC=D0=B0=D0=BB=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=80=D0=B0=D0=BD=D1=82=D0=B0=D0=B9=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Файлы references/ несли сокращённую запись «... db-repo.ps1 -Command …», и scripts/switch.py её не видел: его регулярное выражение требует полной формы powershell.exe -NoProfile -File .ps1. В python-дистрибуции каскад остался бы с .ps1, то есть на macOS указывал бы на неисполнимый файл, а гард переносимости этого не ловит — он следит за плейсхолдером ${CLAUDE_SKILL_DIR}, которого в сокращённой записи тоже не было. Проверено прогоном switch_runtime_content по всем четырём файлам: до правки переключатель находил 0 вызовов при трёх упоминаниях .ps1, после — все конвертируются, .ps1 не остаётся. Co-Authored-By: Claude Opus 5 --- .claude/skills/db-repo/references/admin.md | 6 +++--- .claude/skills/db-repo/references/connect.md | 4 ++-- .claude/skills/db-repo/references/history.md | 4 ++-- .claude/skills/db-repo/references/service.md | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.claude/skills/db-repo/references/admin.md b/.claude/skills/db-repo/references/admin.md index 3adc56577..b8e762954 100644 --- a/.claude/skills/db-repo/references/admin.md +++ b/.claude/skills/db-repo/references/admin.md @@ -3,7 +3,7 @@ ## create — создать хранилище ```powershell -... db-repo.ps1 -Command create -InfoBasePath "C:\Bases\MyDB" -RepositoryPath "C:\Repo\MyApp" -RepositoryUser "Admin" -RepositoryPassword "…" +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command create -InfoBasePath "C:\Bases\MyDB" -RepositoryPath "C:\Repo\MyApp" -RepositoryUser "Admin" -RepositoryPassword "…" ``` | Параметр | Описание | @@ -22,7 +22,7 @@ ## add-user — создать пользователя ```powershell -... db-repo.ps1 -Command add-user -InfoBasePath "C:\Bases\MyDB" -NewUser "Ivanov" -NewUserPassword "…" -Rights LockObjects +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command add-user -InfoBasePath "C:\Bases\MyDB" -NewUser "Ivanov" -NewUserPassword "…" -Rights LockObjects ``` | Право | Что даёт | @@ -38,7 +38,7 @@ ## copy-users — скопировать пользователей из другого хранилища ```powershell -... db-repo.ps1 -Command copy-users -InfoBasePath "C:\Bases\MyDB" -SourcePath "\\srv01\repo\Other" -SourceUser "Admin" -SourcePassword "…" +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command copy-users -InfoBasePath "C:\Bases\MyDB" -SourcePath "\\srv01\repo\Other" -SourceUser "Admin" -SourcePassword "…" ``` `-SourcePath`, `-SourceUser`, `-SourcePassword` описывают хранилище-**источник**. Удалённые пользователи diff --git a/.claude/skills/db-repo/references/connect.md b/.claude/skills/db-repo/references/connect.md index dcaddf11f..6b550de1d 100644 --- a/.claude/skills/db-repo/references/connect.md +++ b/.claude/skills/db-repo/references/connect.md @@ -3,7 +3,7 @@ ## connect — подключить ```powershell -... db-repo.ps1 -Command connect -InfoBasePath "C:\Bases\MyDB" -RepositoryPath "\\srv01\repo\MyApp" -RepositoryUser "Ivanov" -RepositoryPassword "…" +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command connect -InfoBasePath "C:\Bases\MyDB" -RepositoryPath "\\srv01\repo\MyApp" -RepositoryUser "Ivanov" -RepositoryPassword "…" ``` | Параметр | Описание | @@ -19,7 +19,7 @@ ## disconnect — отключить ```powershell -... db-repo.ps1 -Command disconnect -InfoBasePath "C:\Bases\MyDB" +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command disconnect -InfoBasePath "C:\Bases\MyDB" ``` **Спроси подтверждение у пользователя.** Операция необратима. Если пользователь аутентифицируется в хранилище, отключение отражается и diff --git a/.claude/skills/db-repo/references/history.md b/.claude/skills/db-repo/references/history.md index de9ca753a..8b5ea31b4 100644 --- a/.claude/skills/db-repo/references/history.md +++ b/.claude/skills/db-repo/references/history.md @@ -3,7 +3,7 @@ ## report — отчёт по версиям ```powershell -... db-repo.ps1 -Command report -InfoBasePath "C:\Bases\MyDB" -OutputFile "C:\tmp\repo.txt" +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command report -InfoBasePath "C:\Bases\MyDB" -OutputFile "C:\tmp\repo.txt" ``` | Параметр | Описание | @@ -35,7 +35,7 @@ ## dump-cfg — выгрузить версию в CF ```powershell -... db-repo.ps1 -Command dump-cfg -InfoBasePath "C:\Bases\MyDB" -OutputFile "C:\tmp\v120.cf" -Version 120 +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command dump-cfg -InfoBasePath "C:\Bases\MyDB" -OutputFile "C:\tmp\v120.cf" -Version 120 ``` Без `-Version` (или при `-1`) выгружается последняя версия. diff --git a/.claude/skills/db-repo/references/service.md b/.claude/skills/db-repo/references/service.md index e072b0a1d..c154399fd 100644 --- a/.claude/skills/db-repo/references/service.md +++ b/.claude/skills/db-repo/references/service.md @@ -3,7 +3,7 @@ ## set-label — метка на версию ```powershell -... db-repo.ps1 -Command set-label -InfoBasePath "C:\Bases\MyDB" -Label "Релиз 1.2" -Version 120 -Comment "Передано в тест" +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command set-label -InfoBasePath "C:\Bases\MyDB" -Label "Релиз 1.2" -Version 120 -Comment "Передано в тест" ``` Без `-Version` метка ставится на последнюю версию. Несуществующая версия — ошибка. @@ -11,7 +11,7 @@ ## optimize — оптимизация хранения ```powershell -... db-repo.ps1 -Command optimize -InfoBasePath "C:\Bases\MyDB" +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command optimize -InfoBasePath "C:\Bases\MyDB" ``` Оптимизирует хранение данных в хранилище. Операция долгая. @@ -19,7 +19,7 @@ ## clear-cache — очистка кеша ```powershell -... db-repo.ps1 -Command clear-cache -InfoBasePath "C:\Bases\MyDB" -CacheScope local +powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-repo.ps1" -Command clear-cache -InfoBasePath "C:\Bases\MyDB" -CacheScope local ``` | `-CacheScope` | Что чистит |