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 2022/11/29 12:59:09 UTC
[camel] branch main updated: CAMEL-18772: camel-jbang - Fix run from gist causes long name that can lead to JMX MBean error.
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 39717d73a86 CAMEL-18772: camel-jbang - Fix run from gist causes long name that can lead to JMX MBean error.
39717d73a86 is described below
commit 39717d73a86ac8aef8d915890d777efef6999e91
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Nov 29 13:58:45 2022 +0100
CAMEL-18772: camel-jbang - Fix run from gist causes long name that can lead to JMX MBean error.
---
.../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java | 4 ++++
1 file changed, 4 insertions(+)
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 efc5b3879d5..aaf62399eb6 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
@@ -460,6 +460,10 @@ class Run extends CamelCommand {
// no specific name was given so lets use the name from the first integration file
// remove scheme and keep only the name (no path or ext)
String s = StringHelper.after(file, ":");
+ if (s.contains(":")) {
+ // its maybe a gist/github url so we need only the last part which has the name
+ s = StringHelper.afterLast(s, ":");
+ }
name = FileUtil.onlyName(s);
}