mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-24 21:51:02 +03:00
fix(skills): add file-not-found fallback for Dir/Name/Name.xml paths
When a non-existent path like Dir/Name/Name.xml is passed (common when models construct paths from directory structure), auto-resolve tries Dir/Name.xml as sibling. Applied to all 7 scripts with path resolution. Also update meta-info SKILL.md to encourage skill usage over direct XML reads. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
78e252af1e
commit
bc9087957f
@@ -24,6 +24,15 @@ if (Test-Path $SubsystemPath -PathType Container) {
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
# File not found — check Dir/Name/Name.xml → Dir/Name.xml
|
||||
if (-not (Test-Path $SubsystemPath)) {
|
||||
$fn = [System.IO.Path]::GetFileNameWithoutExtension($SubsystemPath)
|
||||
$pd = Split-Path $SubsystemPath
|
||||
if ($fn -eq (Split-Path $pd -Leaf)) {
|
||||
$c = Join-Path (Split-Path $pd) "$fn.xml"
|
||||
if (Test-Path $c) { $SubsystemPath = $c }
|
||||
}
|
||||
}
|
||||
if (-not (Test-Path $SubsystemPath)) {
|
||||
Write-Host "[ERROR] File not found: $SubsystemPath"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user