2
0
forked from pool/nodejs-common
nodejs-common/node
Adam Majer e5b325e7ce - NodeJS 8.2.0 adds support for npx binary. Add conditional
support to our wrapper
- Print a helpful message if wrapper cannot find target executable
- Wrapper only executes from /usr/bin and not PATH

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-common?expand=0&rev=6
2017-08-02 14:59:33 +00:00

12 lines
230 B
Bash

#!/bin/sh
PROG=$(basename $0)
PROG_VERSION=${NODE_VERSION:--default}
if [ ! -x /usr/bin/${PROG}${PROG_VERSION} ]; then
echo "${PROG}${PROG_VERSION} is unavailable."
exit 127
fi
exec /usr/bin/${PROG}${PROG_VERSION} "$@"