mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Patch cd.fish test to support older macOS versions
The sysctl kern.osproductversion is not available on the oldest versions we support.
This commit is contained in:
parent
57f558578b
commit
4b840075f4
1 changed files with 2 additions and 1 deletions
|
@ -276,7 +276,8 @@ complete -C'cd .'
|
|||
# This is first supported on macOS 12.
|
||||
# `sysctl kern.osproductversion` emits something like:
|
||||
# kern.osproductversion: 14.3.1
|
||||
if test (uname) = "Darwin" && test (sysctl kern.osproductversion | string match -r \\d+) -lt 12
|
||||
# Note that there is no kern.osproductversion under older OS X releases!
|
||||
if test (uname) = "Darwin" && test (sysctl kern.osproductversion 2>/dev/null | string match -r \\d+; or echo 10) -lt 12
|
||||
# Not supported. Satisfy the CHECKs below.
|
||||
echo fake/a
|
||||
echo fake/a/b
|
||||
|
|
Loading…
Reference in a new issue