Skip to content

Commit

Permalink
fix<compiler>: only call readTestFilter if the filter option is enabl…
Browse files Browse the repository at this point in the history
…ed (#29720)

Following the instructions in the compiler/docs/DEVELOPMENT_GUIDE.md, we are stuck on the command `yarn snap --watch` because it calls readTestFilter even though the filter option is not enabled.
  • Loading branch information
TrickyPi authored Jun 3, 2024
1 parent 8b677b1 commit 4082582
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/packages/snap/src/runner-watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ function subscribeFilterFile(
} else if (
events.findIndex((event) => event.path.includes(FILTER_FILENAME)) !== -1
) {
state.filter = await readTestFilter();
if (state.mode.filter) {
state.filter = await readTestFilter();
state.mode.action = RunnerAction.Test;
onChange(state);
}
Expand Down Expand Up @@ -218,7 +218,7 @@ export async function makeWatchRunner(
action: RunnerAction.Test,
filter: filterMode,
},
filter: await readTestFilter(),
filter: filterMode ? await readTestFilter() : null,
};

subscribeTsc(state, onChange);
Expand Down

0 comments on commit 4082582

Please sign in to comment.