fix(check-manifests): skip remote-sourced plugins in local path check
## Why The hook was treating all source values as local directory paths. Remote sources (github/git/npm objects) have no local directory — the jq -r of a JSON object produced garbage, causing the hook to fail on push after adding the mattpocock-skills remote plugin. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,13 @@ plugin_count=$(jq '.plugins | length' "$MARKETPLACE")
|
|||||||
|
|
||||||
for ((i = 0; i < plugin_count; i++)); do
|
for ((i = 0; i < plugin_count; i++)); do
|
||||||
name=$(jq -r ".plugins[$i].name" "$MARKETPLACE")
|
name=$(jq -r ".plugins[$i].name" "$MARKETPLACE")
|
||||||
|
source_type=$(jq -r ".plugins[$i].source | type" "$MARKETPLACE")
|
||||||
|
|
||||||
|
# Remote sources (github, git, npm objects) have no local directory to check
|
||||||
|
if [[ "$source_type" != "string" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
source=$(jq -r ".plugins[$i].source" "$MARKETPLACE")
|
source=$(jq -r ".plugins[$i].source" "$MARKETPLACE")
|
||||||
source="${source#./}"
|
source="${source#./}"
|
||||||
plugin_dir="$REPO_ROOT/$source"
|
plugin_dir="$REPO_ROOT/$source"
|
||||||
|
|||||||
Reference in New Issue
Block a user