mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
Fix 'maintainer --devel-project' to raise an error if running outside a working copy without any arguments
This commit is contained in:
parent
d4ec8e7f3a
commit
8de85e8011
@ -9099,6 +9099,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
delPerson(apiurl, prj, pac, opts.delete, role)
|
delPerson(apiurl, prj, pac, opts.delete, role)
|
||||||
elif opts.devel_project:
|
elif opts.devel_project:
|
||||||
# XXX: does it really belong to this command?
|
# 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)
|
set_devel_project(apiurl, prj, pac, opts.devel_project)
|
||||||
else:
|
else:
|
||||||
if pac:
|
if pac:
|
||||||
|
Loading…
Reference in New Issue
Block a user