diff options
author | Winter <winter@winter.cafe> | 2022-11-09 23:00:06 -0500 |
---|---|---|
committer | Winter <winter@winter.cafe> | 2022-11-21 15:00:08 -0500 |
commit | 80ecb954e988a135422677f32b341718fe271289 (patch) | |
tree | 9771ceab8a039b0aea17c4e34e14f337f0173021 /pkgs/build-support | |
parent | c0e7124bcc4421d5ce9d2e5d4d0f7eec7ce798cc (diff) |
npmHooks.npmConfigHook: add diagnostic for when dependencies aren't provided
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh index d2906d28ca2f3..a8b0fca279986 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh +++ b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh @@ -8,6 +8,15 @@ npmConfigHook() { export HOME="$TMPDIR" export npm_config_nodedir="@nodeSrc@" + if [ -z "${npmDeps-}" ]; then + echo + echo "ERROR: no dependencies were specified" + echo 'Hint: set `npmDeps` if using these hooks individually. If this is happening with `buildNpmPackage`, please open an issue.' + echo + + exit 1 + fi + local -r cacheLockfile="$npmDeps/package-lock.json" local -r srcLockfile="$PWD/package-lock.json" |