From 3e7fb81e7257df9e4ab87b1e216f535d304d8991 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Sat, 27 Oct 2012 22:36:50 +0200 Subject: [PATCH] Revert "Improve Cygwin path-stripping code" This reverts commit eb648717f20ad28d54ae0d3795346980a9f039f4 as it replaces spaces in paths in PATH with colons. Signed-off-by: Sebastian Schuberth --- etc/profile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/profile b/etc/profile index 4d48194f..1f3a001b 100644 --- a/etc/profile +++ b/etc/profile @@ -24,8 +24,10 @@ fi # strip out cygwin paths from PATH case "$PATH" in */cygwin/*) - export PATH=$(IFS=':'; t=($PATH); unset IFS; t=(${t[@]%%*/cygwin/*}); IFS=':'; echo "${t[*]}") - ;; + PATH="$(awk -vRS=: -vORS=: '!/cygwin/' <<< "$PATH")" + # awk always adds a trailing separator + export PATH="${PATH%:}" + ;; esac if [ -z "$USERNAME" ]; then -- 2.11.4.GIT