Skip to content

fix: pass correct directory to copyExtensions in template installatio…#14009

Closed
larcherMTT wants to merge 1 commit intoquarto-dev:mainfrom
larcherMTT:bugfix/14008
Closed

fix: pass correct directory to copyExtensions in template installatio…#14009
larcherMTT wants to merge 1 commit intoquarto-dev:mainfrom
larcherMTT:bugfix/14008

Conversation

@larcherMTT
Copy link

Problem

When running quarto use template organization/template, extensions included in the template fail to copy. An empty _extensions folder is created instead.

Solution

Pass extDir instead of stagedDir to copyExtensions() on line 160 in src/command/use/commands/template.ts.

Changes

  • Fixed argument passed to copyExtensions() call in useTemplate() function

Testing

The fix ensures that:

  • Extensions found during initial staging are also found during the copy phase
  • Template extensions are properly installed along with template files
  • No empty _extensions folders are created

…n\n\nWhen installing template extensions, copyExtensions() was called with\nstagedDir as the source directory instead of extDir (_extensions folder).\nThis caused readExtensions() to fail finding any extensions on the second\ncall, resulting in an empty _extensions folder being created.\n\nFixes: quarto-dev#14008
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Feb 8, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mcanouil
Copy link
Collaborator

mcanouil commented Feb 8, 2026

Thanks, closing in favour on mine which includes tests.

@mcanouil mcanouil closed this Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants