This is an automated email from the ASF dual-hosted git repository.
jmclean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 4ed7c1fdfa [#8052] Improvement(core): Fix directory in
LocalProcessBuilder (#8071)
4ed7c1fdfa is described below
commit 4ed7c1fdfa415c9e9dad4818b53792a6c69f2743
Author: Kyle Lin <[email protected]>
AuthorDate: Thu Aug 14 09:14:33 2025 +0800
[#8052] Improvement(core): Fix directory in LocalProcessBuilder (#8071)
### What changes were proposed in this pull request?
Use `getAbsoluteFile().getParentFile()` instead of `getParentFile()` in
`LocalProcessBuilder.java` to ensure a non-null parent directory even
when the executable path lacks a parent component.
### Why are the changes needed?
Fixes #8052
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
`./gradlew build`
---
.../main/java/org/apache/gravitino/job/local/LocalProcessBuilder.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/core/src/main/java/org/apache/gravitino/job/local/LocalProcessBuilder.java
b/core/src/main/java/org/apache/gravitino/job/local/LocalProcessBuilder.java
index 4307d62cb0..d516284679 100644
--- a/core/src/main/java/org/apache/gravitino/job/local/LocalProcessBuilder.java
+++ b/core/src/main/java/org/apache/gravitino/job/local/LocalProcessBuilder.java
@@ -33,7 +33,7 @@ public abstract class LocalProcessBuilder {
this.jobTemplate = jobTemplate;
// Executable should be in the working directory, so we can figure out the
working directory
// from the executable path.
- this.workingDirectory = new File(jobTemplate.executable()).getParentFile();
+ this.workingDirectory = new
File(jobTemplate.executable()).getAbsoluteFile().getParentFile();
}
public abstract Process start();