2222using System . Threading . Tasks ;
2323using CycloneDX . Models ;
2424using CycloneDX . Utils ;
25+ using System . IO ;
2526
2627namespace CycloneDX . Cli . Commands
2728{
@@ -31,6 +32,8 @@ public static void Configure(RootCommand rootCommand)
3132 {
3233 Contract . Requires ( rootCommand != null ) ;
3334 var subCommand = new Command ( "merge" , "Merge two or more BOMs" ) ;
35+ subCommand . Add ( new Option < string > ( "--input-file-list" , "A single text file with input BOM filenames (one per line)." ) ) ;
36+ //TBD//subCommand.Add(new Option<string>("--input-file-list0", "A single text file with input BOM filenames (separated by 0x00 characters)."));
3437 subCommand . Add ( new Option < List < string > > ( "--input-files" , "Input BOM filenames (separate filenames with a space)." ) ) ;
3538 subCommand . Add ( new Option < string > ( "--output-file" , "Output BOM filename, will write to stdout if no value provided." ) ) ;
3639 subCommand . Add ( new Option < CycloneDXBomFormat > ( "--input-format" , "Specify input file format." ) ) ;
@@ -61,7 +64,12 @@ public static async Task<int> Merge(MergeCommandOptions options)
6164 return ( int ) ExitCode . ParameterValidationError ;
6265 }
6366
64- var inputBoms = await InputBoms ( options . InputFiles , options . InputFormat , outputToConsole ) . ConfigureAwait ( false ) ;
67+ List < string > InputFiles = ( List < string > ) options . InputFiles ;
68+ if ( options . InputFilesList != null )
69+ {
70+ InputFiles . AddRange ( File . ReadAllLines ( options . InputFilesList ) ) ;
71+ }
72+ var inputBoms = await InputBoms ( InputFiles , options . InputFormat , outputToConsole ) . ConfigureAwait ( false ) ;
6573
6674 Component bomSubject = null ;
6775 if ( options . Group != null || options . Name != null || options . Version != null )
0 commit comments