mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
fix: use ERE (-E) for grep to fix POSIX-strict compatibility
This commit is contained in:
parent
a56a6a40f2
commit
d7e743e217
|
|
@ -33,7 +33,7 @@ unexported_vars=0
|
|||
# Set posix mode in bash to only get variables, see #256.
|
||||
[[ -n $BASH_VERSION ]] && builtin set -o posix
|
||||
builtin set | command awk -F '=' '{ print $1 }' | command grep FORGIT_ | while builtin read -r var; do
|
||||
if ! builtin export | command grep -q "\(^$var=\|^export $var=\)"; then
|
||||
if ! builtin export | command grep -Eq "(^$var=|^export $var=)"; then
|
||||
if [[ $unexported_vars == 0 ]]; then
|
||||
forgit::warn "Config options have to be exported in future versions of forgit."
|
||||
forgit::warn "Please update your config accordingly:"
|
||||
|
|
|
|||
Loading…
Reference in a new issue