version: 0.2
env:
  variables:
    PRX_NULL: "null"
phases:
  install:
    commands:
      - 'echo "Installing CloudFormation Linter"'
      - 'pip install cfn-lint'
  build:
    commands:
      - 'cd $(ls -d */|head -n 1)'
      - 'find . -name "*.yml" -type f -mindepth 2 -exec cfn-lint --template {} \; '
  post_build:
      commands:
        - 'curl -sO "https://raw.githubusercontent.com/PRX/Infrastructure/master/ci/utility/post_build.sh" && chmod +x post_build.sh && bash ./post_build.sh'

version: 0.2
env:
  variables:
    PRX_NULL: "null"
phases:
  install:
    commands:
      - 'echo "Installing CloudFormation Linter"'
      - 'pip install cfn-lint'
  build:
    commands:
      - 'cd $(ls -d */|head -n 1)'
      - 'find . -name "*.yml" -type f -mindepth 2 -print0 | xargs -0 -n1 cfn-lint --template'
  post_build:
      commands:
        - 'curl -sO "https://raw.githubusercontent.com/PRX/Infrastructure/master/ci/utility/post_build.sh" && chmod +x post_build.sh && bash ./post_build.sh'

Use xargs for linting to correctly return errors
Use xargs for linting to correctly return errors
