mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-18 16:49:41 +03:00
fix(skills): add sibling XML auto-resolve for directory paths
When a directory is passed (e.g. src/Name or Catalogs/Name), the auto-resolve now also checks for a sibling file ../Name.xml, which is the standard layout for both 1C config dumps and EPF/ERF sources. Affected: meta-info, meta-edit, meta-validate, epf-validate, subsystem-edit, subsystem-info, subsystem-validate (7 scripts). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -402,8 +402,11 @@ if ($Mode -eq "tree") {
|
||||
if (Test-Path $SubsystemPath -PathType Container) {
|
||||
$dirName = Split-Path $SubsystemPath -Leaf
|
||||
$candidate = Join-Path $SubsystemPath "$dirName.xml"
|
||||
$sibling = Join-Path (Split-Path $SubsystemPath) "$dirName.xml"
|
||||
if (Test-Path $candidate) {
|
||||
$SubsystemPath = $candidate
|
||||
} elseif (Test-Path $sibling) {
|
||||
$SubsystemPath = $sibling
|
||||
} else {
|
||||
Write-Host "[ERROR] No $dirName.xml found in directory. Use -Mode tree for directory listing."
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user