coletiv / puppeteer-pdf

PDF generation wrapper for Elixir using Puppeteer
MIT License
97 stars 18 forks source link

Return invalid exec path error when system command returns 127 #26

Closed amarantedaniel closed 5 years ago

amarantedaniel commented 5 years ago

I ran into an issue while running in circleci. My exec_path wasn't setup correctly but I was still getting an :ok because the ErlangError wasn't getting raised and it was really hard to figure out what's wrong.

So this pr returns {:error, :invalid_exec_path} whenever System.cmd returns the error code 127 that means that the command was not found in our PATH.

I also deleted some clauses that can never match according to dialyzer and fixed one command in the README that was wrong 😄

speeddragon commented 5 years ago

Thanks for the PR @amarantedaniel, I will add dialyxir to the dependencies as well.