You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/10/04 07:49:05 UTC

[camel] branch main updated: CAMEL-19948: camel jbang - Transform with no files should not show null.properties

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 98e7aaf3f0c CAMEL-19948: camel jbang - Transform with no files should not show null.properties
98e7aaf3f0c is described below

commit 98e7aaf3f0c5349625093092b2541c407563b60d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Oct 4 09:48:48 2023 +0200

    CAMEL-19948: camel jbang - Transform with no files should not show null.properties
---
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
index 56c9325d978..ad0e0856925 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
@@ -136,7 +136,7 @@ public class Run extends CamelCommand {
 
     @Option(names = { "--profile" }, scope = CommandLine.ScopeType.INHERIT, defaultValue = "application",
             description = "Profile to use, which refers to loading properties file with the given profile name. By default application.properties is loaded.")
-    String profile;
+    String profile = "application";
 
     @Option(names = {
             "--dep", "--deps" }, description = "Add additional dependencies (Use commas to separate multiple dependencies)")
@@ -369,8 +369,9 @@ public class Run extends CamelCommand {
             String routes = profileProperties != null ? profileProperties.getProperty("camel.main.routesIncludePattern") : null;
             if (routes == null) {
                 if (!silentRun) {
+                    String run = transformRun ? "transform" : "run";
                     System.err
-                            .println("Cannot run because " + getProfile()
+                            .println("Cannot " + run + " because " + getProfile()
                                      + ".properties file does not exist or camel.main.routesIncludePattern is not configured");
                     return 1;
                 } else {