Unset GREP_OPTIONS
to avoid unexpected grep behavior (fixes #101)
This commit is contained in:
parent
403154e09e
commit
9c82314570
@ -18,6 +18,8 @@ if [ -z "$READLINK" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
unset GREP_OPTIONS
|
||||
|
||||
resolve_link() {
|
||||
$READLINK "$1"
|
||||
}
|
||||
|
2
test/libexec/pyenv-grep
Executable file
2
test/libexec/pyenv-grep
Executable file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
grep -E "$@"
|
@ -45,3 +45,11 @@ load test_helper
|
||||
assert_failure
|
||||
assert_output "pyenv: cannot change working directory to \`$dir'"
|
||||
}
|
||||
|
||||
@test "conflicting GREP_OPTIONS" {
|
||||
file="${BATS_TMPDIR}/hello"
|
||||
echo "hello" > "$file"
|
||||
GREP_OPTIONS="-F" run pyenv grep "hell." "$file"
|
||||
assert_success
|
||||
assert_output "hello"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user