From 4800f31b3d50f9947725823e46fa9ec7e39f4e71 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 17 Jul 2019 03:03:03 -0400 Subject: [PATCH] fix: Include spec path as relitive to engine-adapter Closes #1427 --- lib/sass_spec/engine_adapter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sass_spec/engine_adapter.rb b/lib/sass_spec/engine_adapter.rb index bff4fc5507..ed24a5aef2 100644 --- a/lib/sass_spec/engine_adapter.rb +++ b/lib/sass_spec/engine_adapter.rb @@ -44,7 +44,7 @@ def compile(sass_filename, precision) dirname, basename = File.split(sass_filename) result = capture3_with_timeout( command, "--precision", precision.to_s, "-t", "expanded", - "-I", File.absolute_path("spec"), *@args&.split(/\s+/), basename, + "-I", File.expand_path("../../../spec", __FILE__), *@args&.split(/\s+/), basename, binmode: true, timeout: @timeout, chdir: dirname) if result[:timeout] @@ -109,7 +109,7 @@ def describe def compile(sass_filename, precision) dirname, basename = File.split(sass_filename) @stdin.puts "!cd #{File.absolute_path(dirname)}" - @stdin.puts("--no-color --no-unicode -I #{File.absolute_path("spec")} " + + @stdin.puts("--no-color --no-unicode -I #{File.expand_path("../../../spec", __FILE__)} " + "#{@args} #{basename}") [next_chunk(@stdout), next_chunk(@stderr), next_chunk(@stdout).to_i] end