remove some cli deprecation warnings

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
This commit is contained in:
Fredrik Adelöw
2026-03-30 09:41:58 +02:00
parent 0336f92de8
commit 6cc48113fc
8 changed files with 30 additions and 25 deletions
@@ -84,7 +84,7 @@ describe('repo test arg forwarding', () => {
});
it('supports legacy camelCase flag names', () => {
const args = ['--successCache', '--successCacheDir', '/tmp/cache'];
const args = ['--success-cache', '--success-cache-dir', '/tmp/cache'];
const { flags } = parseRepoTestArgs(args);
@@ -319,13 +319,13 @@ export default async ({ args, info }: CliCommandContext) => {
args.push('--help');
}
// This code path is enabled by the --successCache flag, which is specific to
// This code path is enabled by the --success-cache flag, which is specific to
// the `repo test` command in the Backstage CLI.
if (opts.successCache) {
// Refuse to run if file filters are provided
if (parsedArgs.length > 0) {
throw new Error(
`The --successCache flag can not be combined with the following arguments: ${parsedArgs.join(
`The --success-cache flag can not be combined with the following arguments: ${parsedArgs.join(
', ',
)}`,
);
@@ -333,7 +333,7 @@ export default async ({ args, info }: CliCommandContext) => {
// Likewise, it's not possible to combine sharding and the success cache
if (args.includes('--shard')) {
throw new Error(
`The --successCache flag can not be combined with the --shard flag`,
`The --success-cache flag can not be combined with the --shard flag`,
);
}