File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ def display_files(pathname)
112
112
inform ( "Library installed at" ) { installed_library_path . to_s }
113
113
else
114
114
assure_multiline ( "Library installed successfully" ) do
115
+ # print out the contents of the deepest directory we actually find
115
116
@arduino_cmd . lib_dir . ascend do |path_part |
116
117
next unless path_part . exist?
117
118
Original file line number Diff line number Diff line change @@ -57,11 +57,7 @@ def vendor_bundle?(path)
57
57
return false unless base . exist?
58
58
59
59
real = base . realpath
60
- path . ascend do |path_part |
61
- return true if path_part == base
62
- return true if path_part == real
63
- end
64
- false
60
+ path . ascend . any? { |part | part == base || part == real }
65
61
end
66
62
67
63
# Check whether libasan (and by extension -fsanitizer=address) is supported
@@ -98,15 +94,10 @@ def cpp_files_in(some_dir)
98
94
# CPP files that are part of the project library under test
99
95
# @return [Array<Pathname>]
100
96
def cpp_files
101
- real_tests_dir = tests_dir . realpath
97
+ tests_dir_aliases = [ tests_dir , tests_dir . realpath ]
102
98
cpp_files_in ( @base_dir ) . reject do |p |
103
- next true if p . ascend do |path_part |
104
- break true if path_part == tests_dir
105
- break true if path_part == real_tests_dir
106
- break true if vendor_bundle? ( p )
107
- end
108
-
109
- false
99
+ # ignore anything in the vendor bundle or tests dir
100
+ vendor_bundle? ( p ) || ( p . ascend . any? { |part | tests_dir_aliases . include? ( part ) } )
110
101
end
111
102
end
112
103
You can’t perform that action at this time.
0 commit comments