🐛 Fix problem if unity helper path is specified as relative path starting with ..

This commit is contained in:
Mark VanderVoord
2024-10-03 10:03:33 -04:00
parent 74b8ed295a
commit 43618c8c78
+1 -1
View File
@@ -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