1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-24 03:02:12 +01:00

Merge pull request #1389 from dmach/fix-build-from-git-when-alternative-project-is-set

Fix 'build' command when '--alternative-project' option is specified …
This commit is contained in:
Daniel Mach 2023-08-28 08:26:58 +02:00 committed by GitHub
commit a01e6da19c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7232,8 +7232,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
store = osc_store.get_store(Path.cwd(), print_warnings=True)
store.assert_is_package()
if opts.alternative_project == store.project:
opts.alternative_project = None
try:
if opts.alternative_project and opts.alternative_project == store.project:
opts.alternative_project = None
except RuntimeError:
# ignore the following exception: Couldn't map git branch '<BRANCH>' to a project
pass
# HACK: avoid calling some underlying store_*() functions from parse_repoarchdescr() method
# We'll fix parse_repoarchdescr() later because it requires a larger change