`--profile` missing from `quarto call engine`, `call build-ts-extension`, and `call typst-gather` --help

Aperta Adatta ai principianti
#14,915 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Inizia in src/command/call/cmd.ts e confronta la gestione dei profili con appendLogOptions in src/core/log.ts. Esamina appendProfileArg in src/quarto-core/profile.ts, quindi controlla l’output dell’help per engine, build-ts-extension, typst-gather e axe. Il lavoro è completato quando i tre sottocomandi interessati mostrano coerentemente --profile senza modificare il comportamento di axe.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

documentation

quarto call engine, quarto call build-ts-extension, and quarto call typst-gather --help are all missing --profile, while quarto call axe --help has it:

$ quarto call typst-gather --help
...
Options:

  -h, --help               - Show this help.
  --init-config            - Generate a starter typst-gather.toml in current directory
  --log          <file>    - Path to log file
  --log-level    <level>   - Log level (debug, info, warning, error, critical)
  --log-format   <format>  - Log format (plain, json-stream)
  --quiet                  - Suppress console output.

$ quarto call axe --help
...
  --log         <file>       - Path to log file
  --log-level   <level>      - Log level (debug, info, warning, error, critical)
  --log-format  <format>     - Log format (plain, json-stream)
  --quiet                    - Suppress console output.
  --profile                  - Active project profile(s)

--profile is registered as a global option in appendProfileArg:

https://github.com/quarto-dev/quarto-cli/blob/97f222ff3934fa6291272cbf2d969405c636035b/src/quarto-core/profile.ts#L35-L42

This relies on cliffy's native global: true option inheritance, which per #8438 does not reliably reach every subcommand. appendLogOptions hit the same bug and works around it by manually forwarding the log/quiet options to every subcommand instead of trusting cliffy's inheritance:

https://github.com/quarto-dev/quarto-cli/blob/97f222ff3934fa6291272cbf2d969405c636035b/src/core/log.ts#L81-L99

appendProfileArg never got the same treatment, so it still depends on cliffy's inheritance and only reaches the last subcommand registered under call:

https://github.com/quarto-dev/quarto-cli/blob/97f222ff3934fa6291272cbf2d969405c636035b/src/command/call/cmd.ts#L7-L20

axe was added last (#14815) and is the only one that got --profile by coincidence. This also explains why quarto-web's automated reference docs lost --profile from quarto call typst-gather between v1.11.3 and v1.11.5, even though nothing in typst-gather's own command changed.

We could apply the same subcommand-forwarding pattern from appendLogOptions to appendProfileArg.

Related: #8438

Lingua principale
JavaScript
Stelle
6k
Fork
458
Merge medio
1g 8h
PR unite (30g)
42

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di quarto-dev/quarto-cli

Tutte le issue di quarto-dev/quarto-cli

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.