Skip to content

Commit 4cb1bbc

Browse files
committed
Merge pull request #31 from vincent99/master
Change shell to use bash || sh
2 parents 0b8d9f4 + 9d42b9f commit 4cb1bbc

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

app/pods/container/shell/route.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default OverlayRoute.extend({
77
attachStdin: true,
88
attachStdout: true,
99
tty: true,
10-
command: ['/bin/sh'],
10+
command: ["/bin/sh","-c",'[ -x /bin/bash ] && exec /bin/bash || exec /bin/sh'],
1111
};
1212
var promise = container.doAction('execute',opt).then(function(exec) {
1313
exec.set('instance', container);

app/pods/container/shell/view.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default Overlay.extend({
44
templateName: 'container/shell',
55

66
status: 'Connecting...',
7+
useClosed: false,
78
socket: null,
89
term: null,
910

@@ -49,13 +50,17 @@ export default Overlay.extend({
4950
socket.onclose = function() {
5051
self.set('status','Closed');
5152
term.destroy();
52-
self.send('overlayClose');
53+
if ( !self.get('userClosed') )
54+
{
55+
self.send('overlayClose');
56+
}
5357
};
5458
};
5559
},
5660

5761
willDestroyElement: function() {
5862
this.set('status','Closed');
63+
this.set('userClosed',true);
5964

6065
var term = this.get('term');
6166
if (term)

app/pods/overlay/route.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,19 @@ export default Ember.Route.extend({
2727

2828
actions: {
2929
goToPrevious: function() {
30-
var route = this.get('previousRoute');
30+
var self = this;
31+
var route = self.get('previousRoute');
3132
if ( route === 'loading' )
3233
{
3334
route = 'index';
3435
}
3536

36-
var args = (this.get('previousParams')||[]).slice();
37+
var args = (self.get('previousParams')||[]).slice();
3738
args.unshift(route);
38-
var res = this.transitionTo.apply(this,args);
39+
var res = self.transitionTo.apply(self,args);
3940

4041
res.catch(function() {
41-
this.transitionTo('index');
42+
self.transitionTo('index');
4243
});
4344
},
4445
}

0 commit comments

Comments
 (0)