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

Quarto Preview Uses WSL Terminal Instead of Local Windows Quarto Installation #635

Open
emstruong opened this issue Jan 15, 2025 · 1 comment
Labels

Comments

@emstruong
Copy link

On Windows machines, when WSL is installed and set as the default terminal in both VS Code and Positron--rendering Quarto previews seems to use the WSL terminal as opposed to powershell

@cderv
Copy link
Contributor

cderv commented Jan 16, 2025

Is this because window.createTerminal() is used and default is to used default terminal ?

// creat terminal
this.terminal_ = window.createTerminal(options);

Current terminal options does not specify a specific shell 🤔

// terminal options
const options = terminalOptions(kPreviewWindowTitle, target, this.previewEnv_);

export function terminalOptions(name: string, target: Uri, env: TerminalEnv) {
// determine preview dir (if any)
const isFile = fs.statSync(target.fsPath).isFile();
const previewDir = isFile ? previewDirForDocument(target) : undefined;
// calculate cwd
const cwd = previewDir || previewTargetDir(target);
// create and show the terminal
const options: TerminalOptions = {
name,
cwd,
env: env as unknown as {
[key: string]: string | null | undefined;
},
};
// add crossref index path to env (will be ignored if we are in a project)
if (isFile) {
options.env!["QUARTO_CROSSREF_INDEX_PATH"] = fileCrossrefIndexStorage(
target.fsPath
);
}
return options;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants