File tree 1 file changed +15
-10
lines changed
packages/workspace/src/tasks-runner
1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -185,17 +185,22 @@ export class TaskOrchestrator {
185
185
output . logCommand ( commandLine ) ;
186
186
process . stdout . write ( outWithErr . join ( '' ) ) ;
187
187
}
188
- if ( outputPath && code === 0 ) {
188
+ if ( outputPath ) {
189
189
fs . writeFileSync ( outputPath , outWithErr . join ( '' ) ) ;
190
- this . cache
191
- . put ( task , outputPath , taskOutputs )
192
- . then ( ( ) => {
193
- this . options . lifeCycle . endTask ( task , code ) ;
194
- res ( code ) ;
195
- } )
196
- . catch ( ( e ) => {
197
- rej ( e ) ;
198
- } ) ;
190
+ if ( code === 0 ) {
191
+ this . cache
192
+ . put ( task , outputPath , taskOutputs )
193
+ . then ( ( ) => {
194
+ this . options . lifeCycle . endTask ( task , code ) ;
195
+ res ( code ) ;
196
+ } )
197
+ . catch ( ( e ) => {
198
+ rej ( e ) ;
199
+ } ) ;
200
+ } else {
201
+ this . options . lifeCycle . endTask ( task , code ) ;
202
+ res ( code ) ;
203
+ }
199
204
} else {
200
205
this . options . lifeCycle . endTask ( task , code ) ;
201
206
res ( code ) ;
You can’t perform that action at this time.
0 commit comments