Skip to content

Commit

Permalink
Merge pull request #8 from pablordoricaw/bug/issue-5
Browse files Browse the repository at this point in the history
Create launch_agent_dir if it doesn't exist when loading agent
  • Loading branch information
pablordoricaw authored Apr 4, 2021
2 parents d7c0897 + b9d9b95 commit ca60174
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mv_dwnlds/plist.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from os.path import dirname, abspath, join, exists
from os import getcwd, system, remove, makedirs
from os import getcwd, system, remove
from pathlib import Path
from plistlib import dump
import argparse

Expand Down Expand Up @@ -33,6 +34,7 @@ def write_plist(plist_file_path, agent_name, python_env):
KeepAlive=True
)

Path(dirname(plist_file_path)).mkdir(parents=True, exist_ok=True)
with open(plist_file_path, "wb") as fp:
dump(plist, fp)

Expand Down

0 comments on commit ca60174

Please sign in to comment.