mirror of
https://github.com/asdf-vm/asdf-nodejs.git
synced 2024-10-06 07:42:08 +08:00
Fix tac on OSX if coreutils are linked in path (#216)
* Fix tac on osx if coreutils are linked in path * Change fallback condition for `tac`. Provide space-safe implementation
This commit is contained in:
parent
3f4950047b
commit
39fd2d03e1
@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# simulate tac on macOS
|
||||
if [[ $(uname -s) = Darwin ]]; then
|
||||
if ! command -v tac &>/dev/null; then
|
||||
tac() {
|
||||
tail -r "$@"
|
||||
cat -n "$@" | sort -nrk1 | cut -f2-
|
||||
}
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user