mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
npmHooks.npmInstallHook: ignore rather than error for missing bin/man keys in package.json
This commit is contained in:
parent
fdbdb2d282
commit
8999c9d930
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user