fix iTerm support for stable version of iTerm; another fix for #4298

This commit is contained in:
Andre Weinand 2016-03-19 00:25:05 +01:00
parent d451e0222a
commit 1912d41ac3
2 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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();