Skip to content

Commit

Permalink
make version sort compatible with busybox sort
Browse files Browse the repository at this point in the history
There are too many cases where people have non-coreutils versions in there PATH.
  • Loading branch information
Mic92 committed Dec 21, 2023
1 parent 324ab0e commit 7450eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion direnvrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7450eb0

Please sign in to comment.