mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
If a short-path cannot be created, fallback to absolute path, even though it's more verbose.
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user