Skip to content

Commit c3384a5

Browse files
cdervclaude
andcommitted
fix: restore --output-dir synthetic project creation
Move singleFileProjectContext fallback after the --output-dir check so the synthetic project creation path remains reachable. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 780d000 commit c3384a5

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/command/render/render-shared.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ export async function render(
4747
const nbContext = pContext?.notebookContext || notebookContext();
4848

4949
// determine target context/files
50-
// let context = await projectContext(path, nbContext, options);
51-
let context = pContext || (await projectContext(path, nbContext, options)) ||
52-
(await singleFileProjectContext(path, nbContext, options));
50+
let context = pContext || (await projectContext(path, nbContext, options));
5351

5452
// Create a synthetic project when --output-dir is used without a project file
5553
// This creates a temporary .quarto directory to manage the render, which must
@@ -62,6 +60,11 @@ export async function render(
6260
options.forceClean = options.flags.clean !== false;
6361
}
6462

63+
// Fall back to single file context if we still don't have a context
64+
if (!context) {
65+
context = await singleFileProjectContext(path, nbContext, options);
66+
}
67+
6568
// set env var if requested
6669
if (context && options.setProjectDir) {
6770
// FIXME we can't set environment variables like this with asyncs flying around

0 commit comments

Comments
 (0)