File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -288,9 +288,22 @@ async function copyHarmonyBundle(outputFolder: string) {
288
288
}
289
289
await fs . remove ( path . join ( harmonyRawPath , 'update.json' ) ) ;
290
290
await fs . copy ( 'update.json' , path . join ( harmonyRawPath , 'update.json' ) ) ;
291
-
292
291
await fs . ensureDir ( outputFolder ) ;
293
- await fs . copy ( harmonyRawPath , outputFolder ) ;
292
+
293
+ const files = await fs . readdir ( harmonyRawPath ) ;
294
+ for ( const file of files ) {
295
+ if ( file !== 'update.json' && file !== 'meta.json' ) {
296
+ const sourcePath = path . join ( harmonyRawPath , file ) ;
297
+ const destPath = path . join ( outputFolder , file ) ;
298
+ const stat = await fs . stat ( sourcePath ) ;
299
+
300
+ if ( stat . isFile ( ) ) {
301
+ await fs . copy ( sourcePath , destPath ) ;
302
+ } else if ( stat . isDirectory ( ) ) {
303
+ await fs . copy ( sourcePath , destPath ) ;
304
+ }
305
+ }
306
+ }
294
307
} catch ( error : any ) {
295
308
console . error ( t ( 'copyHarmonyBundleError' , { error } ) ) ;
296
309
throw new Error ( t ( 'copyFileFailed' , { error : error . message } ) ) ;
You can’t perform that action at this time.
0 commit comments