|
From: | Gregory Heytings |
Subject: | bug#58080: 29.0.50; Don't hard-code path to pwd |
Date: | Mon, 26 Sep 2022 10:59:29 +0000 |
The difference is that /bin/pwd gives, unlike pwd, the "true" path (without symlinks).Like pwd -P. Though if $PWD is no longer accurate, pwd works like pwd -P.
Yes, bash's built-in pwd assumes -L by default (which is what POSIX mandates), and coreutils' pwd assumes -P by default. POSIX requires support for both -L and -P, so the safe fix here is to replace /bin/pwd by pwd -P.
[Prev in Thread] | Current Thread | [Next in Thread] |