npmHooks.npmInstallHook: ignore rather than error for missing bin/man keys in package.json

This commit is contained in:
Lily Foster 2023-12-06 10:43:20 -05:00 committed by Matthieu Coudron
parent fdbdb2d282
commit 8999c9d930

View File

@ -30,12 +30,14 @@ npmInstallHook() {
done < <(@jq@ --raw-output '(.bin | type) as $typ | if $typ == "string" then
.name + " " + .bin
elif $typ == "object" then .bin | to_entries | map(.key + " " + .value) | join("\n")
elif $typ == "null" then empty
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
while IFS= read -r man; do
installManPage "$packageOut/$man"
done < <(@jq@ --raw-output '(.man | type) as $typ | if $typ == "string" then .man
elif $typ == "list" then .man | join("\n")
elif $typ == "null" then empty
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
local -r nodeModulesPath="$packageOut/node_modules"