This commit is contained in:
cutemeli
2025-12-22 10:35:30 +00:00
parent 0bfc6c8425
commit 5ce7ca2c5d
38927 changed files with 0 additions and 4594700 deletions

View File

@@ -1,47 +0,0 @@
#!/usr/bin/env bash
#
# Summary: Run an executable with the selected Node version
#
# Usage: nodenv exec <command> [arg1 arg2...]
#
# Runs an executable by first preparing PATH so that the selected Node
# version's `bin' directory is at the front.
#
# For example, if the currently selected Node version is 0.10.26:
# nodenv exec bundle install
#
# is equivalent to:
# PATH="$NODENV_ROOT/versions/0.10.26/bin:$PATH" bundle install
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
exec nodenv-shims --short
fi
NODENV_VERSION="$(nodenv-version-name)"
NODENV_COMMAND="$1"
if [ -z "$NODENV_COMMAND" ]; then
nodenv-help --usage exec >&2
exit 1
fi
export NODENV_VERSION
NODENV_COMMAND_PATH="$(nodenv-which "$NODENV_COMMAND")"
NODENV_BIN_PATH="${NODENV_COMMAND_PATH%/*}"
OLDIFS="$IFS"
IFS=$'\n' scripts=(`nodenv-hooks exec`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do
source "$script"
done
shift 1
if [ "$NODENV_VERSION" != "system" ]; then
export PATH="${NODENV_BIN_PATH}:${PATH}"
fi
exec -a "$NODENV_COMMAND" "$NODENV_COMMAND_PATH" "$@"