Skip to content

Instantly share code, notes, and snippets.

@angelotrivelli
Last active February 10, 2024 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelotrivelli/0bf89b76fc67b589d09fd2f61ea6ff73 to your computer and use it in GitHub Desktop.
Save angelotrivelli/0bf89b76fc67b589d09fd2f61ea6ff73 to your computer and use it in GitHub Desktop.
alias to invoke quarto and also set $QUARTO_PYTHON path correctly for poetry .venv's
function Invoke-QuartoWithPythonEnv {
$env:QUARTO_PYTHON=(Get-Command python).Source
echo "using python from $env:QUARTO_PYTHON"
&"C:\Program Files\Quarto\bin\quarto.exe" $args
}
Set-Alias -Name quarto -Value Invoke-QuartoWithPythonEnv
@angelotrivelli
Copy link
Author

angelotrivelli commented Feb 10, 2024

This should be in the content of $profile.

Type echo $profile in a powershell-7 prompt to get the full path, then edit that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment