File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ async function downloadL10n(root) {
9191 await downloadLanguageFiles ( root , langCode ) ;
9292 }
9393
94- const removeCodes = [ ] ;
94+ const rmCodes = [ ] ;
9595 for ( const entry of fs . readdirSync ( root ) ) {
9696 const dirPath = path . join ( root , entry ) ,
9797 stat = fs . lstatSync ( dirPath ) ;
@@ -101,14 +101,13 @@ async function downloadL10n(root) {
101101 entry !== DEFAULT_LOCALE &&
102102 ! langCodes . includes ( entry )
103103 ) {
104- removeCodes . push ( entry ) ;
104+ fs . rmSync ( dirPath , { recursive : true , force : true } ) ;
105+ rmCodes . push ( entry ) ;
105106 }
106107 }
107- if ( removeCodes . length ) {
108+ if ( rmCodes . length ) {
108109 console . log (
109- "\nConsider removing the following unmaintained locales:\n" +
110- removeCodes . join ( ", " ) +
111- "\n"
110+ `\nRemoved the following unmaintained locales: ${ rmCodes . join ( ", " ) } \n`
112111 ) ;
113112 }
114113}
You can’t perform that action at this time.
0 commit comments