1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-10 04:55:48 +01:00

Fix 'osc init' command

This commit is contained in:
Daniel Mach 2022-09-20 10:02:48 +02:00
parent 6629da6fc6
commit 84138fb41f

View File

@ -227,7 +227,10 @@ class Osc(cmdln.Cmdln):
print(get_osc_version()) print(get_osc_version())
def do_init(self, subcmd, opts, project, package=None, scm_url=None): @cmdln.option('project')
@cmdln.option('package', nargs='?')
@cmdln.option('scm_url', nargs='?')
def do_init(self, subcmd, opts):
""" """
Initialize a directory as working copy Initialize a directory as working copy
@ -250,6 +253,9 @@ class Osc(cmdln.Cmdln):
osc init PRJ PAC SCM_URL osc init PRJ PAC SCM_URL
""" """
project = opts.project
package = opts.package
scm_url = opts.scm_url
apiurl = self.get_api_url() apiurl = self.get_api_url()
if not scm_url: if not scm_url: