Skip to content

Commit c3e7eb8

Browse files
committed
fix: Store absolute path in attemptedPaths for accurate error reporting
Fixed Issue #9: Error message was checking file existence against CWD instead of actual resolved path. Before: - attemptedPaths stored raw relative path: ../parent/pom.xml - Error check: new File(../parent/pom.xml).exists() → checked CWD (wrong!) After: - attemptedPaths stores absolute resolved path: /project/parent/pom.xml - Error check: new File(/project/parent/pom.xml).exists() → correct location This ensures error messages accurately report whether the file exists at the actual location resolution attempted, not a coincidental match in CWD.
1 parent 7e4fc8d commit c3e7eb8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mule-linter-spi/src/main/groovy/com/avioconsulting/mule/linter/resolver/ParentPomResolver.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class ParentPomResolver {
9191
// 1. Try relative path first if provided
9292
if (relativePath) {
9393
File relativePom = resolveRelativePath(relativePath, childDir)
94-
attemptedPaths << relativePath
94+
attemptedPaths << relativePom.absolutePath // Store absolute path for accurate error reporting
9595

9696
if (relativePom?.exists()) {
9797
// Install to local repo for caching

0 commit comments

Comments
 (0)