lib/pdfkit/configuration.rb in pdfkit-0.6.2 vs lib/pdfkit/configuration.rb in pdfkit-0.7.0
- old
+ new
@@ -17,10 +17,10 @@
:encoding => 'UTF-8'
}
end
def wkhtmltopdf
- @wkhtmltopdf ||= (defined?(Bundler::GemfileError) ? `bundle exec which wkhtmltopdf` : `which wkhtmltopdf`).chomp
+ @wkhtmltopdf ||= (defined?(Bundler::GemfileError) && File.exists?('Gemfile') ? `bundle exec which wkhtmltopdf` : `which wkhtmltopdf`).chomp
end
def quiet?
!@verbose
end