Fix bug where terminal button fails if spaces in Kitematic.app path

This commit is contained in:
Jeff Morgan 2014-12-14 22:41:06 -08:00
parent 9a92f1cf35
commit 88cf79569a
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ Template.dashboardSingleApp.events({
} }
}, },
'click .btn-terminal': function () { 'click .btn-terminal': function () {
var cmd = [Boot2Docker.command(), 'ssh', '-t', 'sudo docker exec -i -t ' + this.docker.Id + ' bash']; var cmd = [Boot2Docker.command().replace(/ /g, '\\\\ '), 'ssh', '-t', 'sudo', 'docker', 'exec', '-i', '-t', this.docker.Id, 'bash'];
Util.openTerminal(cmd); Util.openTerminal(cmd);
}, },
'click .btn-start': function (e) { 'click .btn-start': function (e) {

View File

@ -28,7 +28,7 @@ Template.dashboardAppsLayout.events({
AppUtil.logs(this._id); AppUtil.logs(this._id);
}, },
'click .btn-terminal': function () { 'click .btn-terminal': function () {
var cmd = [Boot2Docker.command(), 'ssh', '-t', 'sudo docker exec -i -t ' + this.docker.Id + ' bash']; var cmd = [Boot2Docker.command().replace(/ /g, '\\\\ '), 'ssh', '-t', 'sudo', 'docker', 'exec', '-i', '-t', this.docker.Id, 'bash'];
Util.openTerminal(cmd); Util.openTerminal(cmd);
}, },
'click .btn-restart': function () { 'click .btn-restart': function () {