Skip to content

Commit 7a1698a

Browse files
committed
resolve search paths of import statements in the query (fix #265)
1 parent 24c60a5 commit 7a1698a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

module_loader.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ func (l *moduleLoader) LoadJSONWithMeta(name string, meta map[string]any) (any,
118118
func (l *moduleLoader) lookupModule(name, extension string, meta map[string]any) (string, error) {
119119
paths := l.paths
120120
if path, ok := meta["search"].(string); ok {
121-
paths = append([]string{path}, paths...)
121+
if path = resolvePath(path, ""); path != "" {
122+
paths = append([]string{path}, paths...)
123+
}
122124
}
123125
for _, base := range paths {
124126
path := filepath.Join(base, name+extension)

0 commit comments

Comments
 (0)