From 12d23bacfcea0475a292ad0a060c1ff2e6fbde4c Mon Sep 17 00:00:00 2001 From: Fu Cheng Date: Wed, 15 May 2024 20:42:31 +0800 Subject: [PATCH] normalize working directory --- .../codeexecution/nonsandboxed/NonSandboxedCodeExecutor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-execution/src/main/kotlin/io/github/llmagentbuilder/codeexecution/nonsandboxed/NonSandboxedCodeExecutor.kt b/code-execution/src/main/kotlin/io/github/llmagentbuilder/codeexecution/nonsandboxed/NonSandboxedCodeExecutor.kt index b81bdb4..208ac59 100644 --- a/code-execution/src/main/kotlin/io/github/llmagentbuilder/codeexecution/nonsandboxed/NonSandboxedCodeExecutor.kt +++ b/code-execution/src/main/kotlin/io/github/llmagentbuilder/codeexecution/nonsandboxed/NonSandboxedCodeExecutor.kt @@ -10,7 +10,7 @@ abstract class NonSandboxedCodeExecutor : CodeExecutor { .withArgs(*args(input).toTypedArray()) .withWorkingDirectory( (workingDirectory() ?: ".") - .run { Paths.get(this).toAbsolutePath() } + .run { Paths.get(this).toAbsolutePath().normalize() } .toFile()) .ignoreExitStatus() .run()