cli: no longer default test to watch mode when since flag is provided

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-10-12 18:49:48 +02:00
parent a45e483b95
commit 264058c1f0
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': minor
---
The `repo test` command will no longer default to watch mode if the `--since` flag is provided.
+5 -1
View File
@@ -172,7 +172,11 @@ export async function command(opts: OptionValues, cmd: Command): Promise<void> {
}
// 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');