Merge pull request #17 from Azure/CS-FirstRun

Added delay for first run
This commit is contained in:
Damien Caro 2018-01-03 00:01:19 -08:00 коммит произвёл GitHub
Родитель 08061917db 122d61cba8
Коммит 7a94265e7f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -1,7 +1,7 @@
import { AzureAccount, AzureSession } from "./azure-account.api";
import { OutputChannel, commands, window, MessageItem, Terminal, env } from "vscode";
import { getUserSettings, provisionConsole, runInTerminal, resetConsole , Errors} from './cloudConsoleLauncher'
import { getUserSettings, provisionConsole, runInTerminal, resetConsole , Errors, delay} from './cloudConsoleLauncher'
import { clearInterval, setTimeout } from "timers";
import { CSTerminal } from './utilities';
import { configure } from "vscode/lib/testrunner";
@ -80,9 +80,11 @@ export function openCloudConsole(api: AzureAccount, outputChannel: OutputChannel
}
});
// Introducing arbitrary delay to allow to send the command.
await delay(500);
terminal.show();
return [terminal, response];
return [ terminal, response ];
})().catch(err => {
outputChannel.append('\nConnecting to CloudShell failed with error: \n' + err);

Просмотреть файл

@ -40,7 +40,6 @@ export class CloudShell extends BaseShell {
this.startCloudShell().then(terminal => {
this.csTerm.terminal = terminal[0];
this.csTerm.ws = terminal[1];
console.log(`Obtained terminal info ans ws \n Running command: ${TFCommand}`);
this.runTFCommand(TFCommand, this.csTerm.terminal);
});
}