mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
npmHooks.npmConfigHook: add diagnostic for when dependencies aren't provided
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user