for_all_repos: Empty KAS_REPO_URL if repo is not under version control

repo.url will point the repo.path in that case, but we want the user to
see an empty KAS_REPO_URL, as also documented.

Reported-by: Daniel Wagenknecht <dwagenknecht@emlix.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2021-10-15 15:36:21 +02:00
parent bfee47ebbc
commit a40127f8ed

View File

@ -100,7 +100,7 @@ class ForAllReposCommand(Command):
**ctx.environ,
'KAS_REPO_NAME': repo.name,
'KAS_REPO_PATH': repo.path,
'KAS_REPO_URL': repo.url or '',
'KAS_REPO_URL': '' if repo.operations_disabled else repo.url,
'KAS_REPO_REFSPEC': repo.refspec or '',
}
logging.info('%s$ %s', repo.path, self.command)