From aa484ec906b2d79a76de6e1d80223f05af6b851a Mon Sep 17 00:00:00 2001 From: arkohut <39525455+arkohut@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:20:20 +0800 Subject: [PATCH] fix: make sure plist dir exists --- memos/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/memos/commands.py b/memos/commands.py index 9173231..bdcf41a 100644 --- a/memos/commands.py +++ b/memos/commands.py @@ -400,7 +400,9 @@ def generate_plist(): """ - plist_path = Path.home() / "Library/LaunchAgents/com.user.memos.plist" + plist_dir = Path.home() / "Library/LaunchAgents" + plist_dir.mkdir(parents=True, exist_ok=True) + plist_path = plist_dir / "com.user.memos.plist" with open(plist_path, "w") as f: f.write(plist_content) return plist_path