From e32877c00670da52df59b0d351f0f20c6a392eef Mon Sep 17 00:00:00 2001 From: fauno Date: Tue, 10 Jan 2017 15:10:51 -0300 Subject: [PATCH] at this point we're already in the source dir --- lib/jekyll-pandoc-multiple-formats/pandoc_file.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb index aa8b881..a145c20 100644 --- a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb +++ b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb @@ -185,13 +185,11 @@ def pdf_cover def pdf_cover! if has_cover? && !File.exists?(pdf_cover) - Dir::chdir(@site.config['source']) do - Open3::popen3("convert \"#{cover}\" \"#{pdf_cover}\"") do |stdin, stdout, stderr, thread| - STDERR.print stderr.read + Open3::popen3("convert \"#{cover}\" \"#{pdf_cover}\"") do |stdin, stdout, stderr, thread| + STDERR.print stderr.read - # Wait for the process to finish - thread.value - end + # Wait for the process to finish + thread.value end end