snyk / policy

Snyk policy parser and matching logic
Other
8 stars 8 forks source link

Fix/reading dir as file #62

Closed love-bhardwaj closed 2 years ago

love-bhardwaj commented 2 years ago

What does this PR do?

Fixes issue reported in: https://github.com/snyk/policy/issues/61

One tries to read the content of a file if it is a file and not a directory

Where should the reviewer start?

How should this be manually tested?

  1. create a directory for a project (can be empty) that contains .snyk mkdir -p ~/test/my.snykProject/project
  2. create an empty .snyk file in the project touch ~/test/my.snykProject/project/.snyk
  3. change into project directory cd ~/test/my.snykProject/project
  4. run snyk test

Any background context you want to provide?

What are the relevant tickets?

Screenshots

Additional questions

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.