Skip to content
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

Don't monkey patch vscode ext API #24103

Open
Tyriar opened this issue Sep 12, 2024 · 0 comments
Open

Don't monkey patch vscode ext API #24103

Tyriar opened this issue Sep 12, 2024 · 0 comments
Labels
debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs PR Ready to be worked on

Comments

@Tyriar
Copy link
Member

Tyriar commented Sep 12, 2024

😱

/**
* Monkeypatch the terminal to log commands sent.
*/
function monkeyPatchTerminal(terminal: Terminal) {
if (!(terminal as any).isPatched) {
const oldSendText = terminal.sendText.bind(terminal);
terminal.sendText = (text: string, addNewLine: boolean = true) => {
traceLog(`Send text to terminal: ${text}`);
return oldSendText(text, addNewLine);
};
(terminal as any).isPatched = true;
}
return terminal;
}

@Tyriar Tyriar added the debt Covers everything internal: CI, testing, refactoring of the codebase, etc. label Sep 12, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 12, 2024
@karthiknadig karthiknadig added needs PR Ready to be worked on and removed triage-needed Needs assignment to the proper sub-team labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs PR Ready to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants