From 4d54c29bce71f8c261513e0662cc573d30f3e33e Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 28 Jan 2024 10:47:33 +0100 Subject: [PATCH] home-manager: remove the export of `run` Fixes #4950 --- lib/bash/home-manager.sh | 4 ---- modules/systemd-activate.sh | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/bash/home-manager.sh b/lib/bash/home-manager.sh index 050ffca8..19cbaa68 100644 --- a/lib/bash/home-manager.sh +++ b/lib/bash/home-manager.sh @@ -101,9 +101,6 @@ function _iVerbose() { # # If given the command line option `--silence`, then the command's standard and # error output is sent to `/dev/null` on a live run. -# -# Note, the run function is exported. I.e., it is available also to called Bash -# script. function run() { if [[ $1 == '--silence' ]]; then local silence=1 @@ -118,4 +115,3 @@ function run() { "$@" fi } -export -f run diff --git a/modules/systemd-activate.sh b/modules/systemd-activate.sh index 0eb45996..235f1a24 100644 --- a/modules/systemd-activate.sh +++ b/modules/systemd-activate.sh @@ -110,5 +110,10 @@ function systemdPostReload() { oldGenPath="$1" newGenPath="$2" -run systemctl --user daemon-reload +if [[ -v DRY_RUN ]]; then + echo systemctl --user daemon-reload +else + systemctl --user daemon-reload +fi + systemdPostReload