mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
gitfs: Fix detection of base env when its ref is also mapped to a different env
This commit is contained in:
parent
705caa8cca
commit
3b58dd0da0
1 changed files with 3 additions and 3 deletions
|
@ -1982,6 +1982,9 @@ class GitBase(object):
|
|||
for saltenv, saltenv_conf in six.iteritems(repo_obj.saltenv):
|
||||
if 'ref' in saltenv_conf:
|
||||
ref = saltenv_conf['ref']
|
||||
repo_obj.saltenv_revmap.setdefault(
|
||||
ref, []).append(saltenv)
|
||||
|
||||
if saltenv == 'base':
|
||||
# Remove redundant 'ref' config for base saltenv
|
||||
repo_obj.saltenv[saltenv].pop('ref')
|
||||
|
@ -1996,9 +1999,6 @@ class GitBase(object):
|
|||
)
|
||||
# Rewrite 'base' config param
|
||||
repo_obj.base = ref
|
||||
else:
|
||||
repo_obj.saltenv_revmap.setdefault(
|
||||
ref, []).append(saltenv)
|
||||
|
||||
# Build list of all envs defined by ref mappings in the
|
||||
# per-remote 'saltenv' param. We won't add any matching envs
|
||||
|
|
Loading…
Add table
Reference in a new issue