Skip to content

Commit 25d455c

Browse files
Copilotswissspidy
andauthored
Guard against false-positive command coverage check when package commands fail to load (#216)
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 1d51c6a commit 25d455c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/reusable-regenerate-readme.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,19 @@ jobs:
104104
walk_commands("")
105105
')
106106
107+
FOUND_ROOT=0
108+
while IFS= read -r root; do
109+
if echo "$REGISTERED" | grep -qE "^${root}( |$)"; then
110+
FOUND_ROOT=1
111+
break
112+
fi
113+
done <<< "$ROOTS"
114+
115+
if [ "$FOUND_ROOT" -eq 0 ]; then
116+
echo "::error::None of the documented root commands were found in the registered commands. Package commands may have failed to load."
117+
exit 1
118+
fi
119+
107120
MISSING=0
108121
while IFS= read -r cmd; do
109122
ROOT=$(echo "$cmd" | awk '{print $1}')

0 commit comments

Comments
 (0)