Merge pull request #307 from amarshall/fix-nix-version-read

Fix reading nixpkgs version without trailing newline
This commit is contained in:
Bryan Bennett 2023-02-23 08:04:27 -05:00 committed by GitHub
commit ef0ef1a6e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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