Skip to content

Commit

Permalink
pyenv-version-file-read: use POSIX character sets (#1554)
Browse files Browse the repository at this point in the history
Fixes #623
  • Loading branch information
eddies committed Mar 13, 2020
1 parent 3005c46 commit 89786b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libexec/pyenv-version-file-read
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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.
IFS="${IFS}"$'\r'
words=($(cut -b 1-1024 "$VERSION_FILE" | sed 's/^\s*\(\S\+\).*/\1/'))
words=($(cut -b 1-1024 "$VERSION_FILE" | sed 's/[[:space:]]*\([^[:space:]^[:space:]]*\).*/\1/'))
versions=("${words[@]}")

if [ -n "$versions" ]; then
Expand Down

0 comments on commit 89786b9

Please sign in to comment.