launchd - fixed validation check (#2960) (#2976)

* replaced use of expanduser() with value from HOME var

* fixed sanity check

* added changelog fragment

(cherry picked from commit 1990f79d8a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2021-07-10 13:22:41 +02:00 committed by GitHub
parent 0f884bbadc
commit 94f58d1920
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3 additions and 5 deletions

View file

@ -159,7 +159,7 @@ class Plist:
"""Finds the plist file associated with a service"""
launchd_paths = [
os.path.expanduser('~/Library/LaunchAgents'),
os.path.join(os.getenv('HOME'), 'Library/LaunchAgents'),
'/Library/LaunchAgents',
'/Library/LaunchDaemons',
'/System/Library/LaunchAgents',