Fix quarto render command syntax to use --to=format

- Updated CLI build commands to use proper --to=format syntax instead of --to format
- Fixed in build_full(), build_chapters(), and build_html_only() methods
- Updated BUILD.md documentation to reflect correct syntax
- Updated manage_captions.py error message with correct syntax

This ensures compatibility with quarto's expected command-line argument format.
This commit is contained in:
Vijay Janapa Reddi
2025-10-02 18:54:06 -04:00
parent 096b338031
commit 1da8bb80ff
3 changed files with 5 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ class BuildCommand:
raise ValueError(f"Unknown format type: {format_type}")
render_to = render_targets[format_type]
render_cmd = ["quarto", "render", "--to", render_to]
render_cmd = ["quarto", "render", f"--to={render_to}"]
# Show the command being executed
cmd_str = " ".join(render_cmd)
@@ -147,7 +147,7 @@ class BuildCommand:
# Build with project.render configuration
console.print("[yellow]🔨 Building with fast build configuration...[/yellow]")
render_cmd = ["quarto", "render", "--to", format_arg]
render_cmd = ["quarto", "render", f"--to={format_arg}"]
cmd_str = " ".join(render_cmd)
console.print(f"[blue]💻 Command: {cmd_str}[/blue]")
@@ -282,7 +282,7 @@ class BuildCommand:
self.config_manager.setup_symlink("html")
# Build HTML
render_cmd = ["quarto", "render", "--to", "html"]
render_cmd = ["quarto", "render", "--to=html"]
cmd_str = " ".join(render_cmd)
console.print(f"[blue]💻 Command: {cmd_str}[/blue]")

View File

@@ -332,7 +332,7 @@ quarto render --to html
```sh
cd quarto
ln -sf config/_quarto-pdf.yml _quarto.yml
quarto render --to titlepage-pdf
quarto render --to=titlepage-pdf
```
#### EPUB version:

View File

@@ -321,7 +321,7 @@ class FigureCaptionImprover:
print(f"\n💡 To fix:")
print(f" 1. Uncomment these chapters in _quarto.yml, OR")
print(f" 2. Exclude these directories from processing, OR")
print(f" 3. Run 'quarto render --to titlepage-pdf' after uncommenting")
print(f" 3. Run 'quarto render --to=titlepage-pdf' after uncommenting")
print(f"\n❌ HALTING EXECUTION - Please resolve these issues first.")
return True # Should halt