summaryrefslogtreecommitdiff
path: root/tests/misc/pwd-long
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/pwd-long')
-rwxr-xr-xtests/misc/pwd-long10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long
index c67db024f..df1590c7d 100755
--- a/tests/misc/pwd-long
+++ b/tests/misc/pwd-long
@@ -56,11 +56,11 @@ sub normalize_to_cwd_relative ($$$)
# Set up a safe, well-known environment
delete @ENV{qw(BASH_ENV CDPATH ENV)};
$ENV{IFS} = '';
-# PATH is tricky - we can't just clear it, or cygwin will fail. But we
-# can't use it as-is, or taint checking in `` will stop us. For this
-# script, it is enough to scrub the incoming $PATH first.
-$ENV{'PATH'} =~ /(.*)/;
-$ENV{'PATH'} = "$1";
+
+# Taint checking requires a sanitized $PATH. This script performs no $PATH
+# search, so on most Unix-based systems, it is fine simply to clear $ENV{PATH}.
+# However, on Cygwin, it's used to find cygwin.dll, so set it.
+$ENV{PATH} = '/bin:/usr/bin';
# Save CWD's device and inode numbers.
my ($dev, $ino) = (stat '.')[0, 1];