mirror of https://github.com/docker/docs.git
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:
parent
c43a8d5a69
commit
955a43a14d
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue