File tree 1 file changed +13
-0
lines changed 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -813,6 +813,7 @@ export class ChangelogProcessor extends MarkdownProcessor {
813
813
814
814
class LicenseProcessor extends BaseProcessor {
815
815
private didFindLicense = false ;
816
+ private expectedLicenseName : string ;
816
817
filter : ( name : string ) => boolean ;
817
818
818
819
constructor ( manifest : Manifest ) {
@@ -821,8 +822,10 @@ class LicenseProcessor extends BaseProcessor {
821
822
const match = / ^ S E E L I C E N S E I N ( .* ) $ / . exec ( manifest . license || '' ) ;
822
823
823
824
if ( ! match || ! match [ 1 ] ) {
825
+ this . expectedLicenseName = 'LICENSE.md or LICENSE.txt' ;
824
826
this . filter = name => / ^ e x t e n s i o n \/ l i c e n s e ( \. ( m d | t x t ) ) ? $ / i. test ( name ) ;
825
827
} else {
828
+ this . expectedLicenseName = match [ 1 ] ;
826
829
const regexp = new RegExp ( '^extension/' + match [ 1 ] + '$' ) ;
827
830
this . filter = regexp . test . bind ( regexp ) ;
828
831
}
@@ -848,6 +851,16 @@ class LicenseProcessor extends BaseProcessor {
848
851
849
852
return Promise . resolve ( file ) ;
850
853
}
854
+
855
+ async onEnd ( ) : Promise < void > {
856
+ if ( ! this . didFindLicense ) {
857
+ util . log . warn ( `${ this . expectedLicenseName } not found` ) ;
858
+
859
+ if ( ! / ^ y $ / i. test ( await util . read ( 'Do you want to continue? [y/N] ' ) ) ) {
860
+ throw new Error ( 'Aborted' ) ;
861
+ }
862
+ }
863
+ }
851
864
}
852
865
853
866
class IconProcessor extends BaseProcessor {
You can’t perform that action at this time.
0 commit comments