File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -294,14 +294,20 @@ program
294294 } )
295295 break ;
296296 case 'gateway' :
297- const all_apps = getExistingApps ( { currentDir : cwd ( ) } ) ;
297+ const apps = getExistingApps ( { currentDir : cwd ( ) } ) ;
298+ if ( ! apps ) {
299+ logInfo ( { message : `No apps found in this project. You need to have atleast one app to generate a gateway` } )
300+ ora ( ) . info ( `Run 'suite generate' to create one...` )
301+ process . exit ( 0 ) ;
302+
303+ }
298304 const formatAppsName = ( app ) => app . name ;
299305 prompt ( [
300306 {
301307 type : 'checkbox' ,
302308 name : 'apps' ,
303309 message : 'Select apps' ,
304- choices : all_apps . map ( app => ( {
310+ choices : apps . map ( app => ( {
305311 name : formatAppsName ( app ) ,
306312 value : app ,
307313 checked : true , // Default all services to be selected
You can’t perform that action at this time.
0 commit comments