Skip to content

Commit

Permalink
fix iTerm support for stable version of iTerm; another fix for #4298
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Mar 18, 2016
1 parent d451e02 commit 1912d41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/vs/workbench/parts/execution/electron-browser/iterm.scpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ on run argv
tell application "iTerm"
activate

set myterm to (current terminal)
if (count terminal) = 0 then
set myterm to (make new terminal)
else
set myterm to (current terminal)
end if

tell myterm
tell (launch session "Default")
write text command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class MacTerminalService implements ITerminalService {

return this._terminalApplicationScriptPath = new TPromise<string>((c, e) => {
let version = '';
let child = cp.spawn('/usr/bin/osascript', ['-e', 'item (((exists application "iTerm") as integer) + 1) of {0, version of application "iTerm"}']);
let child = cp.spawn('/usr/bin/osascript', ['-e', 'version of application "iTerm"']);
child.on('error', e);
child.stdout.on('data', (data) => {
version += data.toString();
Expand Down

0 comments on commit 1912d41

Please sign in to comment.