Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Patch to `/usr/libexec/path_helper` to prevent hangs with long `PATH`s

View path_helper.patch
1 2 3 4 5 6 7 8 9 10 11 12
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
Something went wrong with that request. Please try again.