-
DescriptionI've just found out that quarto uses for post-render shell command a different version of powershell that I use as main. In any terminal window, the command post-render:
- powershell $PSVersionTable.PSVersion will return This has created me much confusion because I couldn't understand why my script was failing: it was failing because I was triyng to use stuff not yet supported. How can I tell quarto which powershell version to use? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
That's controlled by your PATH I believe. You should also be able to provide full path to binary in post render. I am not on Windows and do not have PowerShell installed. Even-though I would have it, 5.1 is the version used internally by Windows. CC @cderv |
Beta Was this translation helpful? Give feedback.
-
So here you are calling explicitly powershell 5 which is what you get. Quarto is just calling what ever command you pass using Deno.Run - it won't do anything else about shell configuration or detection. |
Beta Was this translation helpful? Give feedback.
-
this I was missing. I fixed changing |
Beta Was this translation helpful? Give feedback.
powershell
is the CLI command for powershell 5 versionpwsh
is the CLI command for powershell 7+See https://learn.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7.4#renamed-powershellexe-to-pwshexe
So here you are calling explicitly powershell 5 which is what you get.
Quarto is just calling what ever command you pass using Deno.Run - it won't do anything else about shell configuration or detection.