Skip to content

Commit b24a44d

Browse files
fix(core): Fix Amber Home Path Resolution (#4356)
### What changes were proposed in this PR? This PR fixes an issue in `amberHomePath` resolution where the previous implementation could select the wrong repo by going to the parent. This new approach search directly under the current directory. Previous: https://github.com/apache/texera/blob/ac909a07dc656689a946fcc8cf08fbfe6b4595b5/amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala#L39-L59 ### Any related issues, documentation, discussions? Closes #4262 ### How was this PR tested? Manually tested ### Was this PR authored or co-authored using generative AI tooling? No Co-authored-by: Xinyuan Lin <xinyual3@uci.edu>
1 parent 9fafe47 commit b24a44d

File tree

1 file changed

+2
-2
lines changed
  • amber/src/main/scala/org/apache/texera/amber/engine/common

1 file changed

+2
-2
lines changed

amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ object Utils extends LazyLogging {
4242
if (isAmberHomePath(currentWorkingDirectory)) {
4343
currentWorkingDirectory
4444
} else {
45-
// from current path's parent directory, search its children to find amber home path
45+
// from current path's directory, search its children to find amber home path
4646
// current max depth is set to 2 (current path's siblings and direct children)
4747
val searchChildren = Files
48-
.walk(currentWorkingDirectory.getParent, 2)
48+
.walk(currentWorkingDirectory, 2)
4949
.filter((path: Path) => isAmberHomePath(path))
5050
.findAny
5151
if (searchChildren.isPresent) {

0 commit comments

Comments
 (0)