diff --git a/_metadata_validation/validate_metadata.py b/_metadata_validation/validate_metadata.py index 141f1238..862630f7 100644 --- a/_metadata_validation/validate_metadata.py +++ b/_metadata_validation/validate_metadata.py @@ -96,14 +96,14 @@ def print_missing_fields(file_metadata): def get_changed_files(): files_str = os.getenv(consts.ENV_FILES_TO_TRACK, '') if files_str == '': - return [] + return [], [] files_str = files_str.replace(' ', '') files_arr = files_str.split(',') files_to_track = [] removed_files = [] for file in files_arr: docs_path = os.getenv(consts.ENV_DOCS_PREFIX, consts.DOCS_PATH) - if not os.path.isfile(docs_path): + if not os.path.isfile(file): removed_files.append(file) continue if file.startswith(docs_path) and file.endswith('.md'):