Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wkhtmltopdf is not necessarily a file #653

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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