-
Notifications
You must be signed in to change notification settings - Fork 9
Use exit code for activation, deactivation executeCommand #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/features/terminal/terminalActivationState.ts:241
- Correct the spelling error in the log message: replace 'guarentee' with 'guarantee'.
traceVerbose(`Terminal shell execution returned with undefined. Cannot guarentee activation`,);
src/features/terminal/terminalActivationState.ts:298
- Correct the spelling error in the log message: replace 'guarentee' with 'guarantee'.
traceVerbose(`Terminal shell execution returned with undefined. Cannot guarentee deactivation`,);
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
I don't think the changes here dispose correctly. There is nothing stopping the timer calling |
For some reason I thought Promise.race provided inherent safety against this, but I was wrong :/ |
You don't need a new variable, the |
Is f1dfbd4 how you do it? @karthiknadig |
Here is how I wanted to refactor it: https://github.com/microsoft/vscode-python-environments/pull/181/files Either timer or the end event should cause the other to be disposed correctly. In the #181, I also removed the dependency on deferred, extracted common execution code into a separate method (reducing duplication), added additional logging. In the future, when we could handle activation failures. |
Resolves: #169