From 0f912f016011cdbcf7b00cd0af3b4c8baa2e6d40 Mon Sep 17 00:00:00 2001 From: rshalem Date: Mon, 18 May 2020 15:03:10 +0300 Subject: [PATCH] unify fix --- demisto_sdk/commands/validate/file_validator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/demisto_sdk/commands/validate/file_validator.py b/demisto_sdk/commands/validate/file_validator.py index da067e6fb09..f74ea7f0ec6 100644 --- a/demisto_sdk/commands/validate/file_validator.py +++ b/demisto_sdk/commands/validate/file_validator.py @@ -472,8 +472,11 @@ def validate_added_files(self, added_files, file_type: str = None): # noqa: C90 self._is_valid = False elif checked_type(file_path, PACKAGE_SCRIPTS_REGEXES) or file_type == 'script': - unifier = Unifier(os.path.dirname(file_path)) - yml_path, _ = unifier.get_script_package_data() + if file_path.endswith('.yml'): + yml_path = file_path + else: + unifier = Unifier(os.path.dirname(file_path)) + yml_path, _ = unifier.get_script_package_data() # Set file path to the yml file structure_validator.file_path = yml_path script_validator = ScriptValidator(structure_validator)