From 6355d4586e04413efc817f7ee9fb29e7ae1cda49 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Wed, 6 Dec 2023 10:43:20 -0500 Subject: npmHooks.npmInstallHook: ignore rather than error for missing bin/man keys in package.json (cherry picked from commit 816a33f5f0ab68341e8d20a6c88931556c44d316) --- pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh index a2f77bdc6d43..637a46d0788a 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh +++ b/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh @@ -32,12 +32,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" -- cgit v1.2.3