mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-22 18:22:12 +01:00
Fix retrieving apiurl from git repositories in get_api_url() in the command-line code
This commit is contained in:
parent
0b4f39448d
commit
96c5a1491c
@ -873,9 +873,10 @@ class Osc(cmdln.Cmdln):
|
|||||||
print("Path.cwd() failed: ", e, file=sys.stderr)
|
print("Path.cwd() failed: ", e, file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if (is_package_dir(localdir) or is_project_dir(localdir)) and not self.options.apiurl:
|
try:
|
||||||
return osc_store.Store(Path.cwd()).apiurl
|
store = osc_store.get_store(Path.cwd())
|
||||||
else:
|
return store.apiurl
|
||||||
|
except oscerr.NoWorkingCopy:
|
||||||
return conf.config['apiurl']
|
return conf.config['apiurl']
|
||||||
|
|
||||||
def do_version(self, subcmd, opts):
|
def do_version(self, subcmd, opts):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user