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 committed May 25, 2017
1 parent c152d54 commit f4d808a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/wicked_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +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 "Bad #{EXE_NAME}'s path: #{@exe_path}" unless File.exist?(@exe_path)
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 f4d808a

Please sign in to comment.