Skip to content

Commit

Permalink
wkhtmltopdf is not necessarily a file
Browse files Browse the repository at this point in the history
  • Loading branch information
ylecuyer authored May 25, 2017
1 parent d1fc39c commit 5d236e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/wicked_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ class WickedPdf
def initialize(wkhtmltopdf_binary_path = nil)
@exe_path = wkhtmltopdf_binary_path || find_wkhtmltopdf_binary_path
raise "Location of #{EXE_NAME} unknown" if @exe_path.empty?
raise "#{EXE_NAME} is not executable" unless File.executable?(@exe_path)

raise "The executable provided doesn't seem to be #{EXE_NAME}" unless `#{@exe_path} --version`.start_with?(EXE_NAME)
raise "#{EXE_NAME} isn't running correctly" unless $?.success?

retrieve_binary_version
end

Expand Down

0 comments on commit 5d236e0

Please sign in to comment.