File tree 2 files changed +6
-0
lines changed
packages/@angular/cli/tasks
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ export default Task.extend({
26
26
if ( config . project && config . project . ejected ) {
27
27
throw new SilentError ( 'An ejected project cannot use the build command anymore.' ) ;
28
28
}
29
+ if ( ! app . main ) {
30
+ throw new SilentError ( `An app without 'main' cannot use the build command.` ) ;
31
+ }
29
32
if ( runTaskOptions . deleteOutputPath ) {
30
33
fs . removeSync ( path . resolve ( this . project . root , outputPath ) ) ;
31
34
}
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ export default Task.extend({
21
21
if ( appConfig . platform === 'server' ) {
22
22
throw new SilentError ( 'ng test for platform server applications is coming soon!' ) ;
23
23
}
24
+ if ( ! appConfig . main ) {
25
+ throw new SilentError ( `An app without 'main' cannot use the test command.` ) ;
26
+ }
24
27
25
28
return new Promise ( ( resolve ) => {
26
29
const karma = requireProjectModule ( projectRoot , 'karma' ) ;
You can’t perform that action at this time.
0 commit comments