File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ enum ExitCode
2525 LocalPackageCacheError ,
2626 DotnetRestoreFailed ,
2727 GitHubLicenseResolutionFailed ,
28- UnableToLocateDependencyBomRef
28+ UnableToLocateDependencyBomRef ,
29+ UnsupportedSignatureFormat
2930 }
3031}
Original file line number Diff line number Diff line change @@ -445,8 +445,16 @@ public async Task<int> HandleCommandAsync(RunOptions options)
445445
446446 if ( ! string . IsNullOrEmpty ( signingKeyPath ) )
447447 {
448- IBomSigner signer = new XmlBomSigner ( ) ;
449- bomContents = await signer . SignAsync ( signingKeyPath , bomContents ) ;
448+ if ( format == OutputFileFormat . Xml )
449+ {
450+ IBomSigner signer = new XmlBomSigner ( ) ;
451+ bomContents = await signer . SignAsync ( signingKeyPath , bomContents ) ;
452+ }
453+ else
454+ {
455+ Console . WriteLine ( "Signing the BOM is only supported with XML BOMs at the moment." ) ;
456+ return ( int ) ExitCode . UnsupportedSignatureFormat ;
457+ }
450458 }
451459
452460
You can’t perform that action at this time.
0 commit comments