question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error running cfn-lint with pipe (|)

See original GitHub issue

cfn-lint version: v0.23.0

Hello we have a problem running cfn-lint with find command. Only this version is affected as far as we know. We are keeping couple of template is a folder and linting them like that:

find ./templates -type f | xargs cfn-lint -f parseable -c I -t

It worked flawlessly before but with the new update we are getting this error:

2019-08-02 15:37:01,818 - cfnlint.decode - ERROR - Template file not found: None None:1:1:1:2:E0000:Template file not found: None

Splitting the files in separated lines with xargs -L 1 doesn’t help.

If you run the cfn-lint command on it’s own it works as expected.

This example doesn’t work:

find ./templates -type f | xargs -t cfn-lint -f parseable -c I -t
cfn-lint -f parseable -c I -t ./templates/t1.yml ./templates/t2.yml ./templates/t3.yml 
2019-08-02 15:50:20,891 - cfnlint.decode - ERROR - Template file not found: None
None:1:1:1:2:E0000:Template file not found: None

This example works:

cfn-lint -f parseable -c I -t ./templates/t1.yml ./templates/t2.yml ./templates/t3.yml

Regards TT

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kddejongcommented, Aug 2, 2019

@ns-cweber this fix does appear to work for your use case too. Added a test to prevent this from happening again. Should have a fix out shortly.

2reactions
Trandelcommented, Aug 2, 2019

Thanks a lot guys I can confirm

cfn-lint -f parseable -c I -t ./templates/*

works like a charm, we will use it now instead of find.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error running cfn-lint with pipe (|) · Issue #1080 - GitHub
Hello we have a problem running cfn-lint with find command. Only this version is affected as far as we know. We are keeping...
Read more >
cfn-lint failing while validating Cloudformation templates
I had cfn-lint as part of my Jenkins pipeline setup everytime a build has been triggered. It validates the CloudFormation templates on ...
Read more >
cfn-lint - PyPI
For each level of discovered error cfn-lint will use bitwise OR to ... From a command prompt run cfn-lint <path to template> to...
Read more >
CDK Pipelines and CloudFormation linting - Oblivion
Cfn-lint is the CloudFormation Linter tool. ... to a repository and on pull request a pipeline will run and execute the code ......
Read more >
CFN Lint: AWS CloudFormation Linter - Morioh
AWS CloudFormation Linter, Validate AWS CloudFormation yaml/json templates against the AWS CloudFormation Resource Specification and additional checks.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found