quarto-dev / quarto-dev/quarto-cli

Rework env var for Project Context

Open
#9,329 1 comment 0 reactions 2 assignees View on GitHub

@cderv is already working on this.

Since Apr 10, 2024.

enhancement projects
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

We had already QUARTO_PROJECT_DIR
https://github.com/quarto-dev/quarto-cli/blob/1573bc693c174b89ac93d9cde4f051c215e630b1/src/command/render/render-shared.ts#L59-L62

https://github.com/quarto-dev/quarto-cli/blob/1573bc693c174b89ac93d9cde4f051c215e630b1/src/project/serve/serve.ts#L213-L214

Use for Lua I believe
https://github.com/quarto-dev/quarto-cli/blob/1573bc693c174b89ac93d9cde4f051c215e630b1/src/resources/pandoc/datadir/init.lua#L1748-L1750

Is QUARTO_PROJECT_ROOT different? it seems to we could use the same, isn't it ?


I think the difference is that QUARTO_PROJECT_ROOT would be set even in non-project mode.

We now always operate in "project mode", so we should consider merging these two environment variables. It would break backwards compatibility, though, so let's not do it right away.

We should also consider adding a QUARTO_IS_SINGLE_FILE_PROJECT boolean env.

Originally posted by @cscheid in https://github.com/quarto-dev/quarto-cli/issues/8525#issuecomment-2045337630

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.