Skip to content

Commit

Permalink
unify fix
Browse files Browse the repository at this point in the history
  • Loading branch information
reutshal committed May 18, 2020
1 parent f0d44d9 commit 0f912f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions demisto_sdk/commands/validate/file_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f912f0

Please sign in to comment.