File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
packages/@angular/cli/tasks Expand file tree Collapse file tree 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({
2626 if ( config . project && config . project . ejected ) {
2727 throw new SilentError ( 'An ejected project cannot use the build command anymore.' ) ;
2828 }
29+ if ( ! app . main ) {
30+ throw new SilentError ( `An app without 'main' cannot use the build command.` ) ;
31+ }
2932 if ( runTaskOptions . deleteOutputPath ) {
3033 fs . removeSync ( path . resolve ( this . project . root , outputPath ) ) ;
3134 }
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ export default Task.extend({
2121 if ( appConfig . platform === 'server' ) {
2222 throw new SilentError ( 'ng test for platform server applications is coming soon!' ) ;
2323 }
24+ if ( ! appConfig . main ) {
25+ throw new SilentError ( `An app without 'main' cannot use the test command.` ) ;
26+ }
2427
2528 return new Promise ( ( resolve ) => {
2629 const karma = requireProjectModule ( projectRoot , 'karma' ) ;
You can’t perform that action at this time.
0 commit comments