Skip to content

quarto preview in a terminal with a venv: increase wait time to 5s#962

Merged
vezwork merged 3 commits intomainfrom
bugfix/vscode-venv-wait-workaround
May 5, 2026
Merged

quarto preview in a terminal with a venv: increase wait time to 5s#962
vezwork merged 3 commits intomainfrom
bugfix/vscode-venv-wait-workaround

Conversation

@cscheid
Copy link
Copy Markdown
Member

@cscheid cscheid commented May 4, 2026

This attempts to work around vscode clobbering the preview command; recent versions appear to inject shell commands after quarto preview started, which completely breaks the preview command. The 5s timeout was not determined with any level of rigor, but does consistently solve the problem in my environment.

@posit-snyk-bot
Copy link
Copy Markdown
Contributor

posit-snyk-bot commented May 4, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working well with venv-driven rendering in Positron, with any of the configurations I am using:

Image

I will say that I couldn't reproduce the original problem with VS Code 1.118.1 and the released Quarto extension. Does that surprise you?

Can you add a line to the CHANGELOG for this update?

@cscheid
Copy link
Copy Markdown
Member Author

cscheid commented May 4, 2026

I will say that I couldn't reproduce the original problem with VS Code 1.118.1 and the released Quarto extension. Does that surprise you?

I'm not surprised, because this slipped by us. I could only manage to reproduce it by having my shell enable a venv by default.

@cscheid
Copy link
Copy Markdown
Member Author

cscheid commented May 4, 2026

Can you add a line to the CHANGELOG for this update?

Sorry, the changelog entry is there now. (My previous push attempt had failed because of the github outage and I didn't notice.)

add comment explaining magic number
@vezwork
Copy link
Copy Markdown
Member

vezwork commented May 5, 2026

Added a comment explaining that this timeout is a magic number found with trial & error. Will merge once tests pass

@vezwork vezwork merged commit 4fa9ac8 into main May 5, 2026
4 checks passed
@vezwork vezwork deleted the bugfix/vscode-venv-wait-workaround branch May 5, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants