| Patch to `/usr/libexec/path_helper` to prevent hangs with long `PATH`s. | |
| --- path_helper_bak 2009-05-07 15:54:37.000000000 +0200 | |
| +++ path_helper 2009-06-04 10:51:39.000000000 +0200 | |
| @@ -15,7 +15,7 @@ | |
| for f in "$DIR" "$DIR".d/* ; do | |
| if [ -f "$f" ]; then | |
| for p in $(< "$f") ; do | |
| - [[ "$NEWPATH" = *(*:)${p}*(:*) ]] && continue | |
| + egrep -q "(^|${SEP})${p}($|${SEP})" <<<"$NEWPATH" && continue | |
| [ ! -z "$NEWPATH" ] && SEP=":" | |
| NEWPATH="${NEWPATH}${SEP}${p}" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment