From 2f5d9a6f90d8fc0de9c5b07fc10c4203670126db Mon Sep 17 00:00:00 2001 From: wmoxam Date: Tue, 31 Dec 2013 01:44:36 -0500 Subject: [PATCH] Fixes rbenv on OpenBSD and any other systems that don't support head -c --- libexec/rbenv-version-file-read | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rbenv-version-file-read b/libexec/rbenv-version-file-read index 5a1d7a3f..cde0ca75 100755 --- a/libexec/rbenv-version-file-read +++ b/libexec/rbenv-version-file-read @@ -8,7 +8,7 @@ VERSION_FILE="$1" if [ -e "$VERSION_FILE" ]; then # Read the first non-whitespace word from the specified version file. # Be careful not to load it whole in case there's something crazy in it. - words=( $(head -c 1024 "$VERSION_FILE") ) + words=( $(cut -b 1-1024 "$VERSION_FILE") ) version="${words[0]}" if [ -n "$version" ]; then