botmeta sanity: check migrated_to on non-existing file (#64551)
This commit is contained in:
parent
e5c1de29a8
commit
c4b83619a6
1 changed files with 3 additions and 2 deletions
|
@ -80,10 +80,11 @@ def main():
|
|||
path_macros.append(macro)
|
||||
|
||||
# Ensure all `files` correspond to a file
|
||||
for file in botmeta['files']:
|
||||
for file, file_meta in botmeta['files'].items():
|
||||
migrated = isinstance(file_meta, dict) and file_meta.get('migrated_to') is not None
|
||||
for macro in path_macros:
|
||||
file = file.replace('$' + macro, botmeta.get('macros', {}).get(macro, ''))
|
||||
if not os.path.exists(file):
|
||||
if not os.path.exists(file) and not migrated:
|
||||
# Not a file or directory, though maybe the prefix to one?
|
||||
# https://github.com/ansible/ansibullbot/pull/1023
|
||||
if not glob.glob('%s*' % file):
|
||||
|
|
Loading…
Reference in a new issue