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 bd82f645489 CAMEL-21668 : Force the creation of the parent log dir (#16955) bd82f645489 is described below commit bd82f64548956e5c8a9c3d6b649c2e4b1d5fd212 Author: Marco Carletti <mcarl...@redhat.com> AuthorDate: Wed Jan 29 07:06:39 2025 +0100 CAMEL-21668 : Force the creation of the parent log dir (#16955) --- .../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 0da7a368fe7..b8f24480be8 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 @@ -1617,7 +1617,9 @@ public class Run extends CamelCommand { if (!scriptRun) { // remember log file String name = RuntimeUtil.getPid() + ".log"; - logFile = new File(CommandLineHelper.getCamelDir(), name); + final File logDir = CommandLineHelper.getCamelDir(); + logDir.mkdirs(); //make sure the parent dir exists + logFile = new File(logDir, name); logFile.deleteOnExit(); } } else {