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/06/28 07:54:34 UTC
[camel] branch main updated: camel-jbang - Run from github fix
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 fc42718ac9c camel-jbang - Run from github fix
fc42718ac9c is described below
commit fc42718ac9c9cdf77b6469fe15da2fe98821512e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jun 28 09:54:24 2022 +0200
camel-jbang - Run from github fix
---
.../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 256090dd99f..c8a714a41fd 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
@@ -705,8 +705,10 @@ class Run extends CamelCommand {
String ext2 = FileUtil.onlyExt(file, true);
if (ext2 != null) {
+ boolean github = file.startsWith("github:") || file.startsWith("https://github.com/")
+ || file.startsWith("https://gist.github.com/");
// special for yaml or xml, as we need to check if they have camel or not
- if ("xml".equals(ext2) || "yaml".equals(ext2)) {
+ if (!github && ("xml".equals(ext2) || "yaml".equals(ext2))) {
// load content into memory
try (FileInputStream fis = new FileInputStream(file)) {
String data = IOHelper.loadText(fis);