Merge pull request #6980 from virusdave/patch-1

Set `HOME` var to `root`'s home when running `nix-store` as `root`
This commit is contained in:
Théophane Hufschmitt 2022-09-05 16:21:05 +02:00 committed by GitHub
commit 089f584173
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -810,7 +810,7 @@ EOF
fi
_sudo "to load data for the first time in to the Nix Database" \
"$NIX_INSTALLED_NIX/bin/nix-store" --load-db < ./.reginfo
HOME="$ROOT_HOME" "$NIX_INSTALLED_NIX/bin/nix-store" --load-db < ./.reginfo
echo " Just finished getting the nix database ready."
)