From 43618c8c78b1383841f5b8c7bd934484ba4a72b4 Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Thu, 3 Oct 2024 10:03:33 -0400 Subject: [PATCH] :bug: Fix problem if unity helper path is specified as relative path starting with .. --- lib/cmock_config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmock_config.rb b/lib/cmock_config.rb index f8c88f9..c1b495f 100644 --- a/lib/cmock_config.rb +++ b/lib/cmock_config.rb @@ -81,7 +81,7 @@ class CMockConfig require 'pathname' includes1 = options[:includes_c_post_header] || [] includes2 = options[:unity_helper_path].map do |path| - Pathname(path).relative_path_from(Pathname(options[:mock_path])).to_s + Pathname(File.expand_path(path)).relative_path_from(Pathname(File.expand_path(options[:mock_path]))).to_s end options[:includes_c_post_header] = (includes1 + includes2).uniq end