Files
lvmh/docker/npm-shim
T

16 lines
609 B
Bash

#!/bin/sh
# npm shim for headless pi containers: skip lifecycle scripts during package
# installs. pi installs git: packages by running `npm install` in each clone;
# some upstream packages (e.g. husky in rpiv-mono) have postinstall scripts
# that assume a dev machine and fail headless installs. --ignore-scripts
# makes installs safe; runtime code (pure TS/JS extensions) does not need
# installs. Everything else passes through to the real npm (docker/npm-real).
case "$1" in
install|i)
exec /usr/local/bin/npm-real "$@" --ignore-scripts
;;
*)
exec /usr/local/bin/npm-real "$@"
;;
esac