mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 09:20:10 +08:00
Fix pre-epoch test workaround
It turns out that not all systems print an unsigned integer as the output of `stat -c %Y xxx` and the leading `-` can be misinterpreted as a parameter to `string match`.
This commit is contained in:
parent
9cf56047fb
commit
613ecfc7e4
|
@ -66,7 +66,7 @@ touch -m -t 190212112045.40 old
|
|||
touch -m -t 190112112040.39 oldest
|
||||
touch -m -t 203801080314.07 newest
|
||||
|
||||
if string match -qr '^(0|'(stat -c %Y epoch)')$' (stat -c %Y oldest)
|
||||
if string match -qr '^(0|'(stat -c %Y epoch)')$' -- (stat -c %Y oldest)
|
||||
# Filesystem does not support dates older than epoch, so silently skip this test - there's no
|
||||
# guarantee that an FS supports pre-epoch timestamps and lxfs (virtual WSLv1 fs) doesn't.
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user