Skip to content

Commit

Permalink
Change default bash command for attaching the shell in Linux container.
Browse files Browse the repository at this point in the history
Fixes #518 (#622)
  • Loading branch information
PrashanthCorp committed Nov 14, 2018
1 parent 0e969c2 commit 8a263b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions commands/open-shell-container.ts
Expand Up @@ -8,7 +8,6 @@ import { IActionContext } from 'vscode-azureextensionui';
import { ContainerNode } from '../explorer/models/containerNode';
import { RootNode } from '../explorer/models/rootNode';
import { ext } from '../extensionVariables';
import { reporter } from '../telemetry/telemetry';
import { docker, DockerEngineType } from './utils/docker-endpoint';
import { ContainerItem, quickPickContainer } from './utils/quick-pick-container';
const teleCmdId: string = 'vscode-docker.container.open-shell';
Expand All @@ -17,9 +16,9 @@ function getEngineTypeShellCommands(engineType: DockerEngineType): string {
const configOptions: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('docker');
switch (engineType) {
case DockerEngineType.Linux:
return configOptions.get('attachShellCommand.linuxContainer', '/bin/sh');
return configOptions.get('attachShellCommand.linuxContainer');
case DockerEngineType.Windows:
return configOptions.get('attachShellCommand.windowsContainer', 'powershell');
return configOptions.get('attachShellCommand.windowsContainer');
default:
throw new Error(`Unexpected engine type ${engineType}`);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -556,7 +556,7 @@
},
"docker.attachShellCommand.linuxContainer": {
"type": "string",
"default": "/bin/bash",
"default": "/bin/sh -c \"[ -e /bin/bash ] && /bin/bash || /bin/sh\"",
"description": "Attach command to use for Linux containers"
},
"docker.attachShellCommand.windowsContainer": {
Expand Down

0 comments on commit 8a263b7

Please sign in to comment.