File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,10 @@ if options.search_directory
8080else
8181 search_directory = alcove . get_search_directory
8282end
83- alcove . copy_input_files_to_temp ( search_directory , options . product_name )
83+ unless alcove . copy_input_files_to_temp ( search_directory , options . product_name )
84+ STDERR . puts " 🚫 Failed to find files to process. Make sure that --product-name is correct and that you've recently run tests. (Searched for files related to #{ options . product_name } in #{ search_directory } .)" . red
85+ exit_with_code ( 1 )
86+ end
8487
8588gi_filename_absolute = File . join ( Alcove ::TEMP_DIR , "alcove-info.temp" )
8689gen_success = alcove . gen_info_files ( gi_filename_absolute )
Original file line number Diff line number Diff line change @@ -39,12 +39,15 @@ def get_search_directory
3939 def copy_input_files_to_temp ( search_directory , product_name )
4040 puts " 📦 Gathering .gcno and .gcda files..." if @verbose
4141 puts " Searching in #{ search_directory } ..." if @verbose
42+ found_files = false
4243 Find . find ( search_directory ) do |path |
4344 if path . match ( /#{ product_name } .*\. gcda\Z / ) || path . match ( /#{ product_name } .*\. gcno\Z / )
45+ found_files = true
4446 puts " 👍 .#{ path . sub ( search_directory , "" ) } " . green if @verbose
4547 FileUtils . cp ( path , "#{ Alcove ::TEMP_DIR } /" )
4648 end
4749 end
50+ return found_files
4851 end
4952
5053 # Public: Calls the geninfo command to generate information files for
@@ -87,8 +90,8 @@ def genhtml(lcov_file_path, output_directory)
8790
8891 stdout , stderr , exit_status = Open3 . capture3 ( genhtml_cmd )
8992 puts stdout if @verbose
93+ puts stderr if stderr . length > 0
9094 summary_string = extract_percent_from_summary ( stdout )
91-
9295 return exit_status . success? , summary_string
9396 end
9497
Original file line number Diff line number Diff line change 11class Alcove
2- VERSION = '0.2.0 '
2+ VERSION = '0.2.1 '
33end
You can’t perform that action at this time.
0 commit comments