diff --git a/lib/cmock_config.rb b/lib/cmock_config.rb index c1b495f..1b3acfd 100644 --- a/lib/cmock_config.rb +++ b/lib/cmock_config.rb @@ -81,7 +81,11 @@ class CMockConfig require 'pathname' includes1 = options[:includes_c_post_header] || [] includes2 = options[:unity_helper_path].map do |path| - Pathname(File.expand_path(path)).relative_path_from(Pathname(File.expand_path(options[:mock_path]))).to_s + begin + Pathname(File.expand_path(path)).relative_path_from(Pathname(File.expand_path(options[:mock_path]))).to_s + rescue + path + end end options[:includes_c_post_header] = (includes1 + includes2).uniq end