I just played around with colcon-alias and tried to override an existing command:
colcon alias --command build --packages-up-to -- build
The command passes, but every future call to colcon
fails with the following traceback:
Traceback (most recent call last):
File "/home/timon/.local/bin/colcon", line 8, in <module>
sys.exit(main())
File "/home/timon/.local/lib/python3.10/site-packages/colcon_core/command.py", line 118, in main
return _main(command_name=command_name, argv=argv)
File "/home/timon/.local/lib/python3.10/site-packages/colcon_core/command.py", line 154, in _main
known_args, _ = parser.parse_known_args(args=argv)
File "/home/timon/.local/lib/python3.10/site-packages/colcon_alias/argument_parser/alias.py", line 43, in parse_known_args
self._add_aliases()
File "/home/timon/.local/lib/python3.10/site-packages/colcon_alias/argument_parser/alias.py", line 68, in _add_aliases
alias_parser = self._subparser.add_parser(
File "/home/timon/.local/lib/python3.10/site-packages/colcon_core/argument_parser/__init__.py", line 206, in add_parser
self._parser.add_parser(*args, **kwargs))
File "/home/timon/.local/lib/python3.10/site-packages/colcon_defaults/argument_parser/defaults.py", line 66, in add_parser
assert args[0] not in self._parsers
AssertionError