Skip to content

Commit

Permalink
fix external terminal launching on mac(darwin)
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyRen committed Apr 12, 2019
1 parent d1f6e8d commit b02d581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CompileRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

0 comments on commit b02d581

Please sign in to comment.