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/05/09 07:10:24 UTC

[camel] 01/02: CAMEL-18080: camel-jbang - Run from clipboard

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

commit b3272482f1d9c2fe6d48d645ba1448ef1206d4fc
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon May 9 07:00:56 2022 +0200

    CAMEL-18080: camel-jbang - Run from clipboard
---
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java   | 4 ++--
 1 file changed, 2 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 6b3bb801cc6..15de0f5f23e 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
@@ -386,8 +386,8 @@ class Run implements Callable<Integer> {
         if (files != null) {
             for (String file : files) {
 
-                if (file.startsWith("clipboard")) {
-                    // run from clipboard
+                if (file.startsWith("clipboard") && !(new File(file).exists())) {
+                    // run from clipboard (not real file exists)
                     String ext = FileUtil.onlyExt(file, true);
                     if (ext == null || ext.isEmpty()) {
                         throw new IllegalArgumentException(