File tree Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -87,22 +87,23 @@ export default class Build extends BaseCommand {
87
87
const stopOnError = ! this . ignoreTsErrors
88
88
89
89
try {
90
- if ( this . production ) {
91
- await new Compiler (
92
- this . application . appRoot ,
93
- this . encoreArgs ,
94
- this . assets ,
95
- this . logger ,
96
- this . tsconfig
97
- ) . compileForProduction ( stopOnError , this . client )
98
- } else {
99
- await new Compiler (
100
- this . application . appRoot ,
101
- this . encoreArgs ,
102
- this . assets ,
103
- this . logger ,
104
- this . tsconfig
105
- ) . compile ( stopOnError )
90
+ const compiler = new Compiler (
91
+ this . application . appRoot ,
92
+ this . encoreArgs ,
93
+ this . assets ,
94
+ this . logger ,
95
+ this . tsconfig
96
+ )
97
+
98
+ const compiled = this . production
99
+ ? await compiler . compileForProduction ( stopOnError , this . client )
100
+ : await compiler . compile ( stopOnError )
101
+
102
+ /**
103
+ * Set exitCode based upon the compiled status
104
+ */
105
+ if ( ! compiled ) {
106
+ this . exitCode = 1
106
107
}
107
108
} catch ( error ) {
108
109
this . logger . fatal ( error )
You can’t perform that action at this time.
0 commit comments