mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
Merge pull request #307 from amarshall/fix-nix-version-read
Fix reading nixpkgs version without trailing newline
This commit is contained in:
commit
ef0ef1a6e8
1 changed files with 1 additions and 1 deletions
2
direnvrc
2
direnvrc
|
|
@ -272,7 +272,7 @@ use_nix() {
|
|||
elif [[ -f "${path}/.version" && "${path}" == "/nix/store/"* ]]; then
|
||||
# borrow some bits from the store path
|
||||
local version_prefix
|
||||
read -r version_prefix < "${path}/.version"
|
||||
read -r version_prefix < <(cat "${path}/.version" ; echo)
|
||||
version="${version_prefix}-${path:11:16}"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue