@@ -675,6 +675,10 @@ def collect_redist_src(location, output, from_inventory, with_structures, zip, q
675675    type = click .Path ( 
676676        exists = True , file_okay = True , dir_okay = True , readable = True , resolve_path = True )) 
677677
678+ @click .option ('--license' , 
679+     is_flag = True , 
680+     help = 'Validate the license_expression value in the input.' ) 
681+ 
678682@click .option ('--djc' , 
679683    nargs = 2 , 
680684    type = str , 
@@ -692,7 +696,7 @@ def collect_redist_src(location, output, from_inventory, with_structures, zip, q
692696    help = 'Show all error and warning messages.' ) 
693697
694698@click .help_option ('-h' , '--help' ) 
695- def  check (location , djc , log , verbose ):
699+ def  check (location , license ,  djc , log , verbose ):
696700    """ 
697701Check .ABOUT file(s) at LOCATION for validity and print error messages. 
698702
@@ -716,10 +720,11 @@ def check(location, djc, log, verbose):
716720    errors , abouts  =  collect_inventory (location )
717721
718722    # Validate license_expression 
719-     from_check  =  True 
720-     _key_text_dict , errs  =  pre_process_and_fetch_license_dict (abouts , from_check , api_url , api_key )
721-     for  e  in  errs :
722-         errors .append (e )
723+     if  license :
724+         from_check  =  True 
725+         _key_text_dict , errs  =  pre_process_and_fetch_license_dict (abouts , from_check , api_url , api_key )
726+         for  e  in  errs :
727+             errors .append (e )
723728
724729    severe_errors_count  =  report_errors (errors , quiet = False , verbose = verbose , log_file_loc = log )
725730    sys .exit (severe_errors_count )
0 commit comments