File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
tooling/v8-snapshot/src/generator Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -327,8 +327,8 @@ export class SnapshotGenerator {
327
327
}
328
328
logDebug (
329
329
Object . assign ( { } , result , {
330
- snapshotScript : `len: ${ result . snapshotScript . length } ` ,
331
- bundle : `len: ${ result . bundle . length } ` ,
330
+ snapshotScript : `len: ${ Buffer . byteLength ( result . snapshotScript ) } bytes ` ,
331
+ bundle : `len: ${ Buffer . byteLength ( result . bundle ) } bytes ` ,
332
332
meta : '<hidden>' ,
333
333
} ) ,
334
334
)
@@ -503,12 +503,16 @@ export class SnapshotGenerator {
503
503
504
504
return { v8ContextFile : this . v8ContextFile , snapshotBinDir : this . snapshotBinDir }
505
505
} catch ( err : any ) {
506
- if ( err . stderr != null ) {
507
- logError ( err . stderr . toString ( ) )
508
- }
509
-
510
- if ( err . stdout != null ) {
511
- logDebug ( err . stdout . toString ( ) )
506
+ if ( err . stderr || err . stdout ) {
507
+ if ( err . stderr != null ) {
508
+ logError ( err . stderr . toString ( ) )
509
+ }
510
+
511
+ if ( err . stdout != null ) {
512
+ logDebug ( err . stdout . toString ( ) )
513
+ }
514
+ } else {
515
+ logError ( err . toString ( ) )
512
516
}
513
517
514
518
// If things went wrong print instructions on how to execute the
You can’t perform that action at this time.
0 commit comments