Applying review recommendations

This commit is contained in:
Manfred Riem
2026-03-13 10:16:04 -05:00
parent db66637f8d
commit 1a0f8b17ea
4 changed files with 13 additions and 8 deletions

View File

@@ -225,6 +225,8 @@ except Exception:
local core="$base/${template_name}.md"
[ -f "$core" ] && echo "$core" && return 0
return 1
# Return success with empty output so callers using set -e don't abort;
# callers check [ -n "$TEMPLATE" ] to detect "not found".
return 0
}

View File

@@ -163,7 +163,7 @@ function Resolve-Template {
$presets = $registryData.presets
if ($presets) {
$sortedPresets = $presets.PSObject.Properties |
Sort-Object { if ($_.Value.priority) { $_.Value.priority } else { 10 } } |
Sort-Object { if ($null -ne $_.Value.priority) { $_.Value.priority } else { 10 } } |
ForEach-Object { $_.Name }
}
} catch {