From b02d581c90eb03e092b04d7cc38acdfd1010a289 Mon Sep 17 00:00:00 2001 From: DaeIn Lee Date: Fri, 12 Apr 2019 20:30:09 +0900 Subject: [PATCH] fix external terminal launching on mac(darwin) --- src/CompileRun.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CompileRun.ts b/src/CompileRun.ts index 7cdcd2f..54a1330 100644 --- a/src/CompileRun.ts +++ b/src/CompileRun.ts @@ -229,9 +229,9 @@ export class CompileRun { return false; } case 'darwin': - exec(`osascript - e 'tell application "Terminal" to do script "./"${file.executable}" && read -n1 -p "Press any key to continue...""'`, { cwd: file.directory }); + exec(`osascript -e 'do shell script "open -a Terminal " & "${file.directory}"' -e 'delay 0.3' -e 'tell application "Terminal" to do script ("./" & "${file.executable}") in first window'`); return true; } return false; } -} \ No newline at end of file +}