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

Running quarto create project blog . in Positron Terminal opens VSCode window #10268

Closed
isabelizimm opened this issue Jul 10, 2024 · 2 comments · Fixed by #10615
Closed

Running quarto create project blog . in Positron Terminal opens VSCode window #10268

isabelizimm opened this issue Jul 10, 2024 · 2 comments · Fixed by #10615
Assignees
Labels
bug Something isn't working editors Issues with editing in text editors, IDEs, etc
Milestone

Comments

@isabelizimm
Copy link

Bug description

I'm making a new blog via the Quarto CLI inside the terminal in Positron. It looks like there is some auto-open-up-in-new-window capabilities, but I can't seem to have the new window be Positron--it always opens up VSCode.

Steps to reproduce

  1. Open up Positron
  2. In Positron terminal, run quarto create project blog .
  3. See VSCode being opened

Expected behavior

I expected a new window of Positron to be opened (or no window).

Actual behavior

Opened up a new window of VSCode.

Your environment

  • Positron version: 2024.06.1 (Universal) build 17
  • Quarto version: 1.5.47
  • MacOS M1

Quarto check output

Quarto 1.5.47
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.47
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2022.10
      Chromium: 869685

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/isabelzimmerman/Library/TinyTeX/bin/universal-darwin
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.7
      Path: /Users/isabelzimmerman/.pyenv/versions/3.10.7/envs/positron/bin/python
      Jupyter: 5.3.0
      Kernels: pydemo, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
      knitr: 1.47
      rmarkdown: 2.27

[✓] Checking Knitr engine render......OK
@isabelizimm isabelizimm added the bug Something isn't working label Jul 10, 2024
@cderv
Copy link
Collaborator

cderv commented Jul 11, 2024

Thanks for the report.

Did you try also from the Quarto: Create project in command palette from the Quarto extension ?
We are using the vscode node module command

// open the project
await commands.executeCommand("vscode.openFolder", Uri.file(projDir));

Source : https://github.com/quarto-dev/quarto/blob/06678d55143a7d6de6c7f0232db0c5dcf8392ca6/apps/vscode/src/providers/create/create-project.ts#L79-L80

We may also need to adapt the extension 🤔

Some notes about current quarto create command

  • It has a --open argument supporting only vscode and rstudio

    export const kEditorInfos: EditorInfo[] = [
    vscodeEditorInfo(),
    rstudioEditorInfo(),
    ];

  • If we had this editor, we should then manage to use it when we detect we are in it

    // See if we are executing inside of an editor, and just use
    // that editor
    const inEditor = editors.find((ed) => ed.inEditor);
    if (inEditor) {
    return inEditor;

@cderv cderv added the editors Issues with editing in text editors, IDEs, etc label Jul 11, 2024
@cderv cderv added this to the v1.6 milestone Jul 11, 2024
@cderv cderv self-assigned this Jul 11, 2024
@jennybc
Copy link

jennybc commented Aug 20, 2024

I just encountered this too, in my experimentations while pondering/reviewing r-lib/usethis#2045.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working editors Issues with editing in text editors, IDEs, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants