mirror of
https://github.com/nix-community/nix-direnv.git
synced 2024-08-16 15:00:31 +03:00
make version sort compatible with busybox sort
There are too many cases where people have non-coreutils versions in there PATH.
This commit is contained in:
parent
2cb4a9d83e
commit
ced8704eff
2
direnvrc
2
direnvrc
@ -38,7 +38,7 @@ _nix() {
|
||||
|
||||
_require_version() {
|
||||
local cmd=$1 version=$2 required=$3
|
||||
if ! printf "%s\n" "$required" "$version" | sort --check=quiet --version-sort; then
|
||||
if ! printf "%s\n" "$required" "$version" | LC_ALL=C sort -c -V 2>/dev/null; then
|
||||
_nix_direnv_fatal \
|
||||
"minimum required $(basename "$cmd") version is $required (installed: $version)"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user