From: Guido Günther Date: Thu, 30 Sep 2021 14:06:39 +0000 (+0200) Subject: dch: Require EMAIL or DEBEMAIL to be set X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82750c05dbdd627fa6b6c208f0fef30f6e574639;p=tools%2Fgit-buildpackage.git dch: Require EMAIL or DEBEMAIL to be set The alternative would be to set a dummy address in case of --git-author but that again can use $EMAIL so just fail if both are unset. Closes: #987611 --- diff --git a/gbp/scripts/dch.py b/gbp/scripts/dch.py index 635a4544..4914b778 100644 --- a/gbp/scripts/dch.py +++ b/gbp/scripts/dch.py @@ -459,6 +459,12 @@ def main(argv): try: old_cwd = os.path.abspath(os.path.curdir) + for var in ['EMAIL', 'DEBEMAIL']: + if var in os.environ and os.environ[var]: + break + else: + raise GbpError("Either 'EMAIL' or 'DEBEMAIL' must be set in the environment for 'dch' to work") + try: repo = DebianGitRepository('.', toplevel=False) os.chdir(repo.path)