diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2017-06-03 00:15:27 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2017-06-03 00:15:27 +0200 |
| commit | d703c39421b86ca5e4c8ce982c638b9f5faf5629 (patch) | |
| tree | e4bb48ac4d5f2e5b9a643b4d958f953dc1feb072 /modules/system | |
| parent | bed2e17e008cb8832d1cf7f1e22606e9fd995546 (diff) | |
launchd: hide 'No such file or directory' messages with first activation
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/launchd.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/system/launchd.nix b/modules/system/launchd.nix index 2960df8..35c1f60 100644 --- a/modules/system/launchd.nix +++ b/modules/system/launchd.nix @@ -97,7 +97,7 @@ in ${concatMapStringsSep "\n" (attr: launchdActivation "LaunchAgents" attr.target) launchAgents} ${concatMapStringsSep "\n" (attr: launchdActivation "LaunchDaemons" attr.target) launchDaemons} - for f in $(ls /run/current-system/Library/LaunchAgents); do + for f in $(ls /run/current-system/Library/LaunchAgents 2> /dev/null); do if test ! -e "${cfg.build.launchd}/Library/LaunchAgents/$f"; then echo "removing service $(basename $f .plist)" >&2 launchctl unload -w "/Library/LaunchAgents/$f" || true @@ -105,7 +105,7 @@ in fi done - for f in $(ls /run/current-system/Library/LaunchDaemons); do + for f in $(ls /run/current-system/Library/LaunchDaemons 2> /dev/null); do if test ! -e "${cfg.build.launchd}/Library/LaunchDaemons/$f"; then echo "removing service $(basename $f .plist)" >&2 launchctl unload -w "/Library/LaunchDaemons/$f" || true @@ -122,7 +122,7 @@ in ${concatMapStringsSep "\n" (attr: userLaunchdActivation attr.target) userLaunchAgents} - for f in $(ls /run/current-system/user/Library/LaunchAgents); do + for f in $(ls /run/current-system/user/Library/LaunchAgents 2> /dev/null); do if test ! -e "${cfg.build.launchd}/user/Library/LaunchAgents/$f"; then echo "removing user service $(basename $f .plist)" >&2 launchctl unload -w ~/Library/LaunchAgents/$f || true |
