File tree 1 file changed +23
-1
lines changed
1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ const promises = fixtures.map((fixture) =>
80
80
operation : 'revert' ,
81
81
} )
82
82
}
83
+ if ( output . exitCode !== 0 ) {
84
+ const errorMessage = `[${ fixture } ] Failed to install dependencies or build a fixture`
85
+ console . error ( errorMessage )
86
+ throw new Error ( errorMessage )
87
+ }
83
88
fixtureList . delete ( fixture )
84
89
} )
85
90
} ) . finally ( ( ) => {
@@ -91,5 +96,22 @@ const promises = fixtures.map((fixture) =>
91
96
}
92
97
} ) ,
93
98
)
94
- await Promise . allSettled ( promises )
99
+ const prepareFixturesResults = await Promise . allSettled ( promises )
100
+ const failedFixturesErrors = prepareFixturesResults
101
+ . map ( ( promise ) => {
102
+ if ( promise . status === 'rejected' ) {
103
+ return promise . reason
104
+ }
105
+ return null
106
+ } )
107
+ . filter ( Boolean )
108
+
109
+ if ( failedFixturesErrors . length > 0 ) {
110
+ console . error ( '🚨 Some fixtures failed to prepare:' )
111
+ for ( const error of failedFixturesErrors ) {
112
+ console . error ( error )
113
+ }
114
+ process . exit ( 1 )
115
+ }
116
+
95
117
console . log ( '🎉 All fixtures prepared' )
You can’t perform that action at this time.
0 commit comments