microsoft / microsoft/vscode-python-environments

Leverage execution.exitCode for execution promise resolve

Đang mở
#169 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@anthonykim1 đang làm issue này rồi.

Từ ngày 7/2/2025.

debt needs PR
Ngôn ngữ chính
TypeScript
Star
138
Fork
62
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
35

Mô tả

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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.