Skip to content

Commit 392d6ca

Browse files
committed
Special treatment of includeonly files by the watcher
1 parent babf29a commit 392d6ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/notebook/commands/watcher/command.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ async def setup_watchers(manager: TaskRunner, base_logger: loguru.Logger, *, reb
5656
if path.match('src/notebook/figures/*.py') and path.name != '__init__.py':
5757
manager.schedule(PythonTask(target, reason='watcher', base_logger=base_logger))
5858

59-
if target.kind == TaskTriggerKind.BUILD:
59+
if target.kind == TaskTriggerKind.BUILD or path.match('includeonly'):
6060
if rebuild_all_figures:
6161
if path.match('asymptote/*.asy'):
6262
for figure_path in FIGURES_PATH.glob('*.asy'):
@@ -79,14 +79,14 @@ async def setup_watchers(manager: TaskRunner, base_logger: loguru.Logger, *, reb
7979
)
8080
)
8181

82-
if not path.match('output/notebook.pdf') and (
82+
if (
8383
path.match('notebook.tex') or
8484
path.match('includeonly') or
8585
path.match('classes/notebook.cls') or
8686
path.match('bibliography/*.bib') or
8787
path.match('text/*.tex') or
8888
path.match('images/*') or
89-
path.match('output/*') or
89+
(path.match('output/*') and not path.match('output/notebook.pdf')) or
9090
path.match('packages/*.sty')
9191
):
9292
manager.schedule(

0 commit comments

Comments
 (0)