提交 4ba91305 编写于 作者: D Daniel Imms

Fix workspace shell settings

Fixes #26178
上级 185886a2
......@@ -141,14 +141,12 @@ export class TerminalConfigHelper implements ITerminalConfigHelper {
const message = nls.localize('terminal.integrated.allowWorkspaceShell', "Do you allow {0} (defined as a workspace setting) to be launched in the terminal?", changeString);
const options = [nls.localize('allow', "Allow"), nls.localize('disallow', "Disallow")];
this._choiceService.choose(Severity.Info, message, options, 1).then(choice => {
switch (choice) {
case 0:
this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, true, StorageScope.WORKSPACE);
case 1:
this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, false, StorageScope.WORKSPACE);
default:
return TPromise.as(null);
if (choice === 0) {
this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, true, StorageScope.WORKSPACE);
} else {
this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, false, StorageScope.WORKSPACE);
}
return TPromise.as(null);
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册