Fix bug where we want to set custom shell

- at container details sub header
- tried to access to array like object
- added reduce function to make array object
This commit is contained in:
Vojta Bartos 2015-06-05 10:11:04 +02:00
parent c43a8d5a69
commit 955a43a14d
1 changed files with 5 additions and 1 deletions

View File

@ -102,7 +102,11 @@ var ContainerDetailsSubheader = React.createClass({
if (!this.disableTerminal()) {
metrics.track('Terminaled Into Container');
var container = this.props.container;
var shell = ContainerUtil.env(container).SHELL;
var shell = ContainerUtil.env(container).reduce((envs, env) => {
envs[env[0]] = env[1];
return envs;
}, {}).SHELL;
if(typeof shell === 'undefined') {
shell = 'sh';
}