From 1b8bf5c3270386a1b6850bd77d79dbdbaf0d7a7c Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 19 Mar 2023 23:32:23 +0100 Subject: [PATCH] home-manager: avoid stray error message Failure to create the global profiles directory is not actually an error since we can recover. Therefore, avoid printing the mkdir error message. --- modules/lib-bash/activation-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lib-bash/activation-init.sh b/modules/lib-bash/activation-init.sh index e719352dc..b68b76817 100644 --- a/modules/lib-bash/activation-init.sh +++ b/modules/lib-bash/activation-init.sh @@ -42,7 +42,7 @@ function setupVars() { # In the future we may perform a one-shot migration to the new location. # # shellcheck disable=2174 - if [[ -d "$globalProfilesDir" ]] || mkdir -m 0755 -p "$globalProfilesDir"; then + if [[ -d "$globalProfilesDir" ]] || mkdir -m 0755 -p "$globalProfilesDir" 2>/dev/null; then declare -r hmProfilesDir="$globalProfilesDir" else declare -r hmProfilesDir="$hmStateDir/profiles"