Skip to content

Commit

Permalink
Exclude project inputs from the list of configResources when watching
Browse files Browse the repository at this point in the history
This deals with the case where an input could appear both as a project input and a config resource:

```
project:
  type: manuscript

manuscript:
  article: article.qmd
```
  • Loading branch information
dragonstyle committed Jul 12, 2023
1 parent 8688318 commit fc43119
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/project/serve/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ export function watchProject(
!existsSync(file)
);
const configResourceFile = paths.some((path) =>
(project.files.configResources || []).includes(path)
(project.files.configResources || []).includes(path) &&
!project.files.input.includes(path)
);
const resourceFile = paths.some(isResourceFile);
const extensionFile = paths.some(isExtensionFile);
Expand Down

0 comments on commit fc43119

Please sign in to comment.