Fix polling error compile

This commit is contained in:
Daniel Imms 2023-11-08 09:49:39 -08:00
parent 29ddbd371e
commit 3794d74d3c
No known key found for this signature in database
GPG Key ID: E5CF412B63651C69

View File

@ -44,9 +44,10 @@ export function setup() {
// not edge case race conditions on terminal start up
async function pollForCommandAndOutput(command: string, exitCode: number): Promise<void> {
const data = generateCommandAndOutput(command, exitCode);
let element;
for (let i = 0; i < 10; i++) {
await terminal.runCommandWithValue(TerminalCommandIdWithValue.WriteDataToTerminal, data);
const element = await app.code.getElement('.terminal-sticky-scroll .xterm-rows');
element = await app.code.getElement('.terminal-sticky-scroll .xterm-rows');
if (element && element.textContent.indexOf(`Prompt> ${command}`) >= 0) {
return;
}