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,22 +0,0 @@
#!/usr/bin/env bash
# Usage: nodenv version-file-read <file>
set -e
[ -n "$NODENV_DEBUG" ] && set -x
VERSION_FILE="$1"
if [ -e "$VERSION_FILE" ]; then
# Read the first word from the specified version file. Avoid reading it whole.
IFS="${IFS}"$'\r'
words=( $(cut -b 1-1024 "$VERSION_FILE") )
version="${words[0]}"
if [[ $version == *..* ]]; then
echo "nodenv: invalid version in \`$VERSION_FILE'" >&2
elif [ -n "$version" ]; then
echo "$version"
exit
fi
fi
exit 1