karlpauls commented on a change in pull request #18:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-launcher/pull/18#discussion_r593969219



##########
File path: src/main/java/org/apache/sling/feature/launcher/impl/Main.java
##########
@@ -312,8 +359,15 @@ public static void main(final String[] args) {
 
         // check if launcher has already been created
         final LauncherConfig launcherConfig = new LauncherConfig();
-        parseArgs(launcherConfig, args);
-
+        Options options=  parseArgs(launcherConfig, args);
+
+        if(launcherConfig.getFeatureFiles().isEmpty()) {
+            Main.LOG().warn("Missing Feature-File(s). Please set an 
Feature-File to run.");
+            

Review comment:
       I think this is wrong - we support starting up with no features provided 
it is a restart. In that case, we load the previously assembled feature: 
https://github.com/apache/sling-org-apache-sling-feature-launcher/blob/3cefbd39ed17a9c880a07e2b4d7d5a1ce1526e35/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java#L195
   
   I think if you want todo this, it would need to do the bootstrap.run() and 
catch the exception from here: 
https://github.com/apache/sling-org-apache-sling-feature-launcher/blob/3cefbd39ed17a9c880a07e2b4d7d5a1ce1526e35/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java#L201
   
   If that exception happens, you could do the printHelp...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to