mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-04-08 18:20:48 +00:00
Merge pull request #509 from malob/fix-warning-about-HOME
Add `-H` to `sudo nix-env [...]` calls in `darwin-rebuild.sh` to deal with warning
This commit is contained in:
commit
db543d325f
1 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ fi
|
|||
|
||||
if [ "$action" = list ] || [ "$action" = rollback ]; then
|
||||
if [ "$USER" != root ] && [ ! -w $(dirname "$profile") ]; then
|
||||
sudo nix-env -p "$profile" "${extraProfileFlags[@]}"
|
||||
sudo -H nix-env -p "$profile" "${extraProfileFlags[@]}"
|
||||
else
|
||||
nix-env -p "$profile" "${extraProfileFlags[@]}"
|
||||
fi
|
||||
|
@ -178,7 +178,7 @@ if [ -z "$systemConfig" ]; then exit 0; fi
|
|||
|
||||
if [ "$action" = switch ]; then
|
||||
if [ "$USER" != root ] && [ ! -w $(dirname "$profile") ]; then
|
||||
sudo nix-env -p "$profile" --set "$systemConfig"
|
||||
sudo -H nix-env -p "$profile" --set "$systemConfig"
|
||||
else
|
||||
nix-env -p "$profile" --set "$systemConfig"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue