bundler-audit icon indicating copy to clipboard operation
bundler-audit copied to clipboard

Check if the Gemfile.lock path exists before reading

Open picatz opened this issue 7 years ago • 0 comments

Sometimes a project may not have a Gemfile.lock — and so in these cases when bundler audit is ran in the working directory of a project then the command will simply crash without providing a clean error as to why.

To clean this up, I’ve added a small check for the file’s existence; and upon failure, a reason is printed to the screen as to why and then a non-zero exit code is thrown to signify an error occurred.

I’m open to cleaning this up in a different way / maybe giving a different error or something — but I figure’d this would work for me.

picatz avatar Oct 21 '17 21:10 picatz