1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

Merge pull request #1545 from dmach/maintainer-devel-project

Fix 'maintainer --devel-project' to raise an error if running outside a working copy without any arguments
This commit is contained in:
Daniel Mach 2024-04-23 15:49:50 +02:00 committed by GitHub
commit a05a630af7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9106,6 +9106,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
delPerson(apiurl, prj, pac, opts.delete, role)
elif opts.devel_project:
# XXX: does it really belong to this command?
if not prj:
path = os.getcwd()
msg = f"Directory '{path}' is not a working copy"
raise oscerr.NoWorkingCopy(msg)
set_devel_project(apiurl, prj, pac, opts.devel_project)
else:
if pac: