microsoft / microsoft/vscode-python-environments

Leverage execution.exitCode for execution promise resolve

Aperta
#169 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@anthonykim1 ci sta già lavorando.

Dal 7/2/2025.

debt needs PR
Lingua principale
TypeScript
Stelle
140
Fork
63
Merge medio
1g 4h
PR unite (30g)
35

Descrizione

https://github.com/microsoft/vscode-python-environments/pull/160#discussion_r1946083357

We have

                    let timer: NodeJS.Timeout | undefined = setTimeout(() => {
                        execPromise.resolve();
                        traceError(`Shell execution timed out: ${command.executable} ${command.args?.join(' ')}`);
                    }, 2000);

in src/features/terminal/terminalActivationState.ts

We could do a Promise race where we resolve faster, via listening to .onDidEndTerminalShellExecution and watching if exitCode returned with values other than undefined.

Also we should watch for exitCode regardless to ensure if command failed/succeeded. (For example, in the middle of the activation, what if user interrupted and stopped? We should know this)

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.