fresh-cat-90827
12/29/2022, 5:14 PMfresh-cat-90827
12/29/2022, 5:14 PMrun_bar = BoolOption(
default=False,
help="Run bar.",
)
$ ./pants dummy --run-bar myapp:
Unknown flag --bar on run scope
Did you mean --args?
Use `./pants help run` to get help.
[ERROR] Unknown flags --bar on scope run
$ ./pants dummy --dummy-run-bar myapp:
[INFO] Completed.
As the number of goal increases (and there may be custom goals with in-repo plugins), perhaps worth adding a paragraph about it. I think it's super common to have custom options named --check-foo ๐bitter-ability-32190
12/29/2022, 5:15 PMbitter-ability-32190
12/29/2022, 5:15 PMfresh-cat-90827
12/29/2022, 5:16 PMhappy-kitchen-89482
12/29/2022, 5:52 PMhappy-kitchen-89482
12/29/2022, 5:53 PMfresh-cat-90827
12/29/2022, 8:14 PMbecause you can introduce a custom goal name and break existing optionsoh that's a great point. I've added an issue to track and raised a PR to document this peculiarity. See https://github.com/pantsbuild/pants/pull/17899 and https://github.com/pantsbuild/pants/issues/17900