summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2021-05-05 10:12:31 +1000
committerTony Cook <tony@develop-help.com>2021-06-09 10:47:17 +1000
commita52672c51add571c587f2632221f830dc9d70375 (patch)
treee5a55c5214e67a78113c2993109c8df218dc76c8 /dist
parent8d8a6cf5e433f410d4e17f0c9028364384f5915b (diff)
downloadperl-a52672c51add571c587f2632221f830dc9d70375.tar.gz
don't fallback to simple pwd
When _backtick_pwd invokes $pwd_cmd it first clears the PATH, and since the command has no shell metacharacters, it perl won't invoke the shell, so it will always fail. An alternative here might be to use "/bin/sh -c pwd" but there's no guarantee that pwd is available as a shell builtin.
Diffstat (limited to 'dist')
-rw-r--r--dist/PathTools/Cwd.pm6
1 files changed, 0 insertions, 6 deletions
diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index d5bbb82d2e..2e9b311aa5 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -181,12 +181,6 @@ if ($^O =~ /android/) {
}
my $found_pwd_cmd = defined($pwd_cmd);
-unless ($pwd_cmd) {
- # Isn't this wrong? _backtick_pwd() will fail if someone has
- # pwd in their path but it is not /bin/pwd or /usr/bin/pwd?
- # See [perl #16774]. --jhi
- $pwd_cmd = 'pwd';
-}
# Lazy-load Carp
sub _carp { require Carp; Carp::carp(@_) }