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
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)