mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-28 18:57:08 +00:00
launchd: hide 'No such file or directory' messages with first activation
This commit is contained in:
parent
bed2e17e00
commit
d703c39421
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue