From 4c5e10a95893e01dbaeb37927ee119df34972ec4 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sat, 21 Feb 2026 18:46:33 +0300 Subject: [PATCH] fix(db-run): warn on ERF files passed to /Execute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /Execute is EPF-only; passing .erf causes empty form or type confusion. db-run now detects .erf extension and launches the database without /Execute, advising the user to open the report via File→Open. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/db-run/scripts/db-run.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.claude/skills/db-run/scripts/db-run.ps1 b/.claude/skills/db-run/scripts/db-run.ps1 index 2249bc1a..946291e0 100644 --- a/.claude/skills/db-run/scripts/db-run.ps1 +++ b/.claude/skills/db-run/scripts/db-run.ps1 @@ -118,6 +118,15 @@ if ($UserName) { $argString += " /N`"$UserName`"" } if ($Password) { $argString += " /P`"$Password`"" } # --- Optional params --- +if ($Execute) { + $ext = [System.IO.Path]::GetExtension($Execute).ToLower() + if ($ext -eq ".erf") { + Write-Host "[WARN] /Execute не поддерживает ERF-файлы (внешние отчёты)." -ForegroundColor Yellow + Write-Host " Откройте отчёт через «Файл -> Открыть»: $Execute" -ForegroundColor Yellow + Write-Host " Запускаю базу без /Execute." -ForegroundColor Yellow + $Execute = "" + } +} if ($Execute) { $argString += " /Execute `"$Execute`"" }