Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix quarto inspect emitting project for standalone files in RStudio
Current RStudio releases assume project.dir in quarto inspect output
implies a _quarto.yml exists. Since f6a0f89 (v1.9.35), standalone
files always get a project context for engine extension resolution,
which causes inspect to emit project.dir for standalone files. RStudio
then adds _quarto.yml to the deploy list, file.info() returns NA, and
the publishing wizard crashes.

Gate the project emission on !(isSingleFile && isRStudio()) so current
RStudio releases continue to work. The RStudio-side fix is in
rstudio/rstudio#17336.

Fixes rstudio/rstudio#17333
  • Loading branch information
cderv committed Apr 7, 2026
commit a5e7f7049f3d0a5e15e3352ed11c77093fc0f863
5 changes: 4 additions & 1 deletion src/inspect/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
import { validateDocumentFromSource } from "../core/schema/validate-document.ts";
import { error } from "../deno_ral/log.ts";
import { ProjectContext } from "../project/types.ts";
import { isRStudio } from "../core/platform.ts";

export function isProjectConfig(
config: InspectedConfig,
Expand Down Expand Up @@ -238,7 +239,9 @@ const inspectDocumentConfig = async (path: string) => {
};

// if there is a project then add it
if (context?.config) {
// Suppress project for standalone files in RStudio: current releases
// assume project.dir implies _quarto.yml exists (rstudio/rstudio#17333)
if (context?.config && !(context.isSingleFile && isRStudio())) {
config.project = await inspectProjectConfig(context);
}
return config;
Expand Down