lib/pdf_tools/shell.rb in pdf_tools-0.1.1 vs lib/pdf_tools/shell.rb in pdf_tools-0.1.2
- old
+ new
@@ -1,17 +1,17 @@
# frozen_string_literal: true
-require 'open3'
+require "open3"
module PdfTools
# Send commands to the shell
class Shell
def run(command, **options)
stdout, stderr, status = execute(command)
if status != 0
- raise PdfTools::Error, "Command `#{command.join(' ')}` failed!\n Error: #{stderr}"
+ raise PdfTools::Error, "Command `#{command.join(" ")}` failed!\n Error: #{stderr}"
end
$stderr.print(stderr) unless options[:stderr] == false
[stdout, stderr, status]
@@ -27,9 +27,9 @@
[stdout_reader.value, stderr_reader.value, wait_thr.value]
end
[stdout, stderr, status.exitstatus]
rescue Errno::ENOENT, IOError
- ['', "executable not found: \"#{command.first}\"", 127]
+ ["", "executable not found: \"#{command.first}\"", 127]
end
end
end