fix: AppleScript POSIX path 변수 방식 + 단일 -e 실행으로 따옴표 문제 해결

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-26 14:16:23 +09:00
parent f13b998bbc
commit c8e30b530b
2 changed files with 33 additions and 46 deletions

View File

@@ -94,11 +94,8 @@ def run_applescript(script_path: str, *args) -> str:
def run_applescript_inline(script: str) -> str:
"""인라인 AppleScript 실행 — 행별 -e 분할 방식"""
lines = script.strip().split('\n')
cmd = ["osascript"]
for line in lines:
cmd.extend(["-e", line])
"""인라인 AppleScript 실행 — 단일 -e 방식"""
cmd = ["osascript", "-e", script]
try:
result = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
if result.returncode != 0: