1

I've been happily rendering quarto documents in VS code using the 'render' button. Then the next day I get the error (ignore the xxxx in place of my username):

Uni : The term 'Uni' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the       
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:50
 + cmd /C"quarto preview "c:\Users\xxxx\Dropbox (Uni of Auckland)\Qui ...
 +                                                  ~~~
    + CategoryInfo          : ObjectNotFound: (Uni:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Seems to be a problem with the path or the whitespace and there are many questions on stack referencing the same issue using different software that have not helped me:

It renders just fine if I run the command quarto render .\example.qmd. Or if I move the working directory to my Desktop then the render button works again. I cannot change the name of the dropbox because it is institutionally managed. No idea what changed overnight... I would quite like to get the function of using the render button back.

Any ideas? Thanks Stack community!

QAsena
  • 603
  • 4
  • 9

1 Answers1

1

The issue is that the double quotes are nested. There's one set of double quotes for the command passed to cmd /C, and another set for the file path.

Try change your default terminal to something other than cmd /C. Here's how you can change your terminal - https://www.shanebart.com/set-default-vscode-terminal/

neon_ninja
  • 61
  • 2