File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
restx-core-shell/src/main/java/restx/core/shell Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -611,6 +611,28 @@ public void run(final RestxShell shell) throws Exception {
611611 shell .cd (standardCachedAppPath (appNameArg .get ()));
612612 }
613613
614+ if (!ModuleDescriptorType .RESTX .resolveDescriptorFile (shell .currentLocation ()).exists ()) {
615+
616+ Path srvDir = shell .currentLocation ().resolve ("srv" );
617+ if (srvDir .toFile ().exists ()) {
618+ shell .cd (srvDir );
619+ if (!ModuleDescriptorType .RESTX .resolveDescriptorFile (shell .currentLocation ()).exists ()) {
620+ shell .println (String .format ("Cannot find %s in both %s and %s" ,
621+ ModuleDescriptorType .RESTX .getDescriptorFileName (),
622+ shell .currentLocation ().getParent ().toAbsolutePath (),
623+ shell .currentLocation ().toAbsolutePath ()));
624+ shell .println ("=> Cannot run application" );
625+ return ;
626+ }
627+ } else {
628+ shell .println (String .format ("Cannot find %s in %s" ,
629+ ModuleDescriptorType .RESTX .getDescriptorFileName (),
630+ shell .currentLocation ().toAbsolutePath ()));
631+ shell .println ("=> Cannot run application" );
632+ return ;
633+ }
634+ }
635+
614636 boolean sourcesAvailable = Apps .with (shell .getFactory ().getComponent (AppSettings .class )).sourcesAvailableIn (shell .currentLocation ());
615637
616638 String appClassName ;
You can’t perform that action at this time.
0 commit comments