mirror of
https://github.com/NixOS/nix
synced 2024-09-19 23:03:53 -04:00
Fix errors about NIX_STORE_DIR being unset.
This commit is contained in:
parent
9769a0ae7d
commit
878c84d5ee
|
@ -62,7 +62,7 @@ nix-store --verify-path --store "$storeA" "$path"
|
|||
# Verifying path in merged-store
|
||||
nix-store --verify-path --store "$storeB" "$path"
|
||||
|
||||
hashPart=$(echo $path | sed "s^$NIX_STORE_DIR/^^" | sed 's/-.*//')
|
||||
hashPart=$(echo $path | sed "s^${NIX_STORE_DIR:-/nix/store}/^^" | sed 's/-.*//')
|
||||
|
||||
# Lower store can find from hash part
|
||||
[[ $(nix store --store $storeA path-from-hash-part $hashPart) == $path ]]
|
||||
|
|
|
@ -53,7 +53,7 @@ remountOverlayfs () {
|
|||
toRealPath () {
|
||||
storeDir=$1; shift
|
||||
storePath=$1; shift
|
||||
echo $storeDir$(echo $storePath | sed "s^$NIX_STORE_DIR^^")
|
||||
echo $storeDir$(echo $storePath | sed "s^${NIX_STORE_DIR:-/nix/store}^^")
|
||||
}
|
||||
|
||||
initLowerStore () {
|
||||
|
|
Loading…
Reference in a new issue