`quarto create extensions` fails if not `git` installed

Open
#13,384 0 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Sep 16, 2025.

Assessment

This issue has not been assessed yet.

Description

bug extensions

when creating an extension, we do fill template for configuration, and we try to use git to get author information

https://github.com/quarto-dev/quarto-cli/blob/3c9950c77b952a3f2b72ba296c36c30f8cf4b47e/src/command/create/artifacts/artifact-shared.ts#L134

however, this does not handle correctly the fact that if git is not available as a cmd, then execProcess does error.

with something like

❯ quartoDev create extension brand
? Extension Name » test-brand
ERROR: Error executing 'git': Failed to spawn 'git': entity not found

Stack trace:
    at execProcess (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/core/process.ts:203:11)
    at gitAuthor (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/create/artifacts/artifact-shared.ts:152:24)
    at ejsData (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/create/artifacts/artifact-shared.ts:134:24)
    at createExtension (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/create/artifacts/extension.ts:225:22)
    at Object.createArtifact (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/create/artifacts/extension.ts:200:9)
    at Command.actionHandler (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/create/cmd.ts:114:55)
    at eventLoopTick (ext:core/01_core.js:178:7)
    at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7)
    at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14)
    at async quarto (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/quarto.ts:193:5)

Either execProcess should not fail on unknown cmd, and result false

or we should try catch correctly in gitAuthor()

https://github.com/quarto-dev/quarto-cli/blob/3c9950c77b952a3f2b72ba296c36c30f8cf4b47e/src/command/create/artifacts/artifact-shared.ts#L151-L163

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

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.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.