ref: Use recommended subprocess method to edit

This commit is contained in:
Marty Oehme 2025-06-04 16:26:46 +02:00
parent 7dbd93796d
commit 5e6ab6854f
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -93,8 +93,7 @@ def get_notes_file(uuid: str, notes_dir: Path, notes_ext: str) -> Path:
def open_editor(file: Path, editor: str) -> None:
"""Opens a file with the chosen editor."""
_ = whisper(f"Editing note: {file}")
proc = subprocess.Popen(f"{editor} {file}", shell=True)
_ = proc.wait()
_ = subprocess.run(f"{editor} {file}", shell=True)
def add_annotation_if_missing(task: Task, annotation_content: str) -> None: