1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

launchd: fix for user-level services (#899) (#970)

* launchd: fix for user-level services

* fix changelog fragment number

(cherry picked from commit 2794dc7b02)

Co-authored-by: tomaszn <tomaszn@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2020-09-28 07:15:48 +02:00 committed by GitHub
parent 4a5276b589
commit feabad39f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- launchd - fix for user-level services (https://github.com/ansible-collections/community.general/issues/896).

View file

@ -154,7 +154,7 @@ class Plist:
"""Finds the plist file associated with a service"""
launchd_paths = [
'~/Library/LaunchAgents',
os.path.expanduser('~/Library/LaunchAgents'),
'/Library/LaunchAgents',
'/Library/LaunchDaemons',
'/System/Library/LaunchAgents',
@ -163,7 +163,7 @@ class Plist:
for path in launchd_paths:
try:
files = os.listdir(os.path.expanduser(path))
files = os.listdir(path)
except OSError:
continue