diff --git a/.changeset/beige-ghosts-enjoy.md b/.changeset/beige-ghosts-enjoy.md new file mode 100644 index 0000000000..49ae916939 --- /dev/null +++ b/.changeset/beige-ghosts-enjoy.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': minor +--- + +The `repo test` command will no longer default to watch mode if the `--since` flag is provided. diff --git a/packages/cli/src/commands/repo/test.ts b/packages/cli/src/commands/repo/test.ts index c55969d696..c2a31c1129 100644 --- a/packages/cli/src/commands/repo/test.ts +++ b/packages/cli/src/commands/repo/test.ts @@ -172,7 +172,11 @@ export async function command(opts: OptionValues, cmd: Command): Promise { } // Run in watch mode unless in CI, coverage mode, or running all tests - if (!process.env.CI && !hasFlags('--coverage', '--watch', '--watchAll')) { + if ( + !opts.since && + !process.env.CI && + !hasFlags('--coverage', '--watch', '--watchAll') + ) { const isGitRepo = () => runCheck('git', 'rev-parse', '--is-inside-work-tree'); const isMercurialRepo = () => runCheck('hg', '--cwd', '.', 'root');