You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2024/01/22 08:20:22 UTC

(camel) branch main updated: github links are handled later on

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

fmariani 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 00f03bb2079 github links are handled later on
00f03bb2079 is described below

commit 00f03bb2079d4f02d840ba0c3c91f589df6d97c7
Author: Croway <fe...@gmail.com>
AuthorDate: Fri Jan 19 17:37:41 2024 +0100

    github links are handled later on
---
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java  | 5 +++++
 1 file changed, 5 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 cc44e9f87a0..e340c8bfdd5 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
@@ -1294,6 +1294,11 @@ public class Run extends CamelCommand {
     }
 
     private boolean skipFile(String name) {
+        if (name.startsWith("github:") || name.startsWith("https://github.com/")
+                || name.startsWith("https://gist.github.com/")) {
+            return false;
+        }
+
         // flatten file
         name = FileUtil.stripPath(name);