mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
Merge pull request #141 from bbenne10/master
Declare (and enforce) a minimum direnv version
This commit is contained in:
commit
69a0a648bc
1 changed files with 8 additions and 0 deletions
8
direnvrc
8
direnvrc
|
|
@ -1,5 +1,13 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
REQUIRED_DIRENV_VERSION="2.21.3"
|
||||
|
||||
|
||||
if ! has direnv_version || ! direnv_version "$REQUIRED_DIRENV_VERSION" 2>/dev/null; then
|
||||
printf '%s\n' "nix-direnv: base direnv version is older than the required v$REQUIRED_DIRENV_VERSION." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Usage: nix_direnv_version <version_at_least>
|
||||
#
|
||||
# Checks that the nix-direnv version is at least as old as <version_at_least>.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue