mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
guess spec file name from current directory
This commit is contained in:
parent
e010e46b2b
commit
d292c83205
@ -3341,7 +3341,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
if not arg_descr and len(descr) == 1:
|
||||
arg_descr = descr[0]
|
||||
elif not arg_descr:
|
||||
msg = None
|
||||
if len(descr) > 1:
|
||||
spec = os.path.basename(os.getcwd())+'.spec'
|
||||
if spec in descr:
|
||||
arg_descr = spec
|
||||
else:
|
||||
msg = 'Multiple build description files found: %s' % ', '.join(descr)
|
||||
else:
|
||||
msg = 'Missing argument: build description (spec, dsc or kiwi file)'
|
||||
@ -3351,6 +3356,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
msg += ' (this package is not expanded - you might want to try osc up --expand)'
|
||||
except:
|
||||
pass
|
||||
if msg:
|
||||
raise oscerr.WrongArgs(msg)
|
||||
|
||||
return arg_repository, arg_arch, arg_descr
|
||||
|
Loading…
Reference in New Issue
Block a user