Merge pull request #49338 from FeepingCreature/improve-warning-message
improve shell.nix warning messages
This commit is contained in:
commit
a3dbeed475
@ -13,7 +13,7 @@ with lib;
|
|||||||
# Set up the per-user profile.
|
# Set up the per-user profile.
|
||||||
mkdir -m 0755 -p "$NIX_USER_PROFILE_DIR"
|
mkdir -m 0755 -p "$NIX_USER_PROFILE_DIR"
|
||||||
if [ "$(stat --printf '%u' "$NIX_USER_PROFILE_DIR")" != "$(id -u)" ]; then
|
if [ "$(stat --printf '%u' "$NIX_USER_PROFILE_DIR")" != "$(id -u)" ]; then
|
||||||
echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR, should be $(id -u)" >&2
|
echo "WARNING: the per-user profile dir $NIX_USER_PROFILE_DIR should belong to user id $(id -u)" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -w "$HOME" ]; then
|
if [ -w "$HOME" ]; then
|
||||||
@ -35,7 +35,7 @@ with lib;
|
|||||||
NIX_USER_GCROOTS_DIR="/nix/var/nix/gcroots/per-user/$USER"
|
NIX_USER_GCROOTS_DIR="/nix/var/nix/gcroots/per-user/$USER"
|
||||||
mkdir -m 0755 -p "$NIX_USER_GCROOTS_DIR"
|
mkdir -m 0755 -p "$NIX_USER_GCROOTS_DIR"
|
||||||
if [ "$(stat --printf '%u' "$NIX_USER_GCROOTS_DIR")" != "$(id -u)" ]; then
|
if [ "$(stat --printf '%u' "$NIX_USER_GCROOTS_DIR")" != "$(id -u)" ]; then
|
||||||
echo "WARNING: bad ownership on $NIX_USER_GCROOTS_DIR, should be $(id -u)" >&2
|
echo "WARNING: the per-user gcroots dir $NIX_USER_GCROOTS_DIR should belong to user id $(id -u)" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set up a default Nix expression from which to install stuff.
|
# Set up a default Nix expression from which to install stuff.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user