fix(repo-tools): allow excess arguments for generate-catalog-info command

Re-add `.allowExcessArguments(true)` which was dropped during
conflict resolution in the Commander v14 upgrade (PR #32583).

lint-staged passes staged file paths as extra arguments when
invoking `generate-catalog-info` via the pre-commit hook, causing
Commander v14 to reject them with "too many arguments".

Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
Johan Persson
2026-03-02 11:28:06 +01:00
parent ccc20cf1bc
commit 426edbef9c
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Fixed `generate-catalog-info` command failing with "too many arguments" when invoked by lint-staged via the pre-commit hook.
@@ -226,6 +226,7 @@ export function registerCommands(program: Command) {
'CI run checks that there are no changes to catalog-info.yaml files',
)
.description('Create or fix info yaml files for all backstage packages')
.allowExcessArguments(true)
.action(
lazy(
() => import('./generate-catalog-info/generate-catalog-info'),