Currently add-repo will add a broken repository by default, this commit gives a pretty error to instruct the user to use one of the version arguments.
Fixes #45029
Signed-off-by: Maran Hidskes <maran@protonmail.com>
(cherry picked from commit
115b3d7b7f3b4cf4149240fc14e374697a7cd6b1)
def command_add_repo():
if args.version and args.release:
raise Error('you can specify either --release or --version but not both')
+ if not args.version and not args.release and not args.dev and not args.dev_commit:
+ raise Error('please supply a --release, --version, --dev or --dev-commit argument')
if args.version:
try:
(x, y, z) = args.version.split('.')