File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -471,14 +471,17 @@ HAS_FREEBSDDATE=false
471471HAS_OPENBSDDATE=false
472472
473473if date -d @735275209 >/dev/null 2>&1; then
474+ # FreeBSD's / MacOS' date doesn't reach this
474475 if date -r @735275209 >/dev/null 2>&1; then
475476 # Ubuntu >= 25.10
476477 HAS_GNUDATE=true
477- elif LC_ALL=C date -r 735275209 2>&1 | grep -q "No such file"; then
478+ # need to make sure we end up in a directory with read permission (see #3009)
479+ elif (cd /; LC_ALL=C date -r 735275209 2>&1 | grep -q "No such file"); then
478480 # e.g. Debian 24.04, Debian 11-13
479481 HAS_GNUDATE=true
482+ # OpenBSD treats this as a reference (as FreeBSD would do it)
480483 elif date -r 735275209 >/dev/null 2>&1; then
481- # It can't do any conversion from a plain date output.
484+ # OpenBSD date can't do any conversion from a plain date output
482485 HAS_OPENBSDDATE=true
483486 fi
484487fi
You can’t perform that action at this time.
0 commit comments