mirror of
https://github.com/google/go-jsonnet.git
synced 2025-10-02 02:41:13 +02:00
search jpaths from right to left, compatibility with cpp (#140)
This commit is contained in:
parent
4356f42578
commit
dbc7fb3dc2
@ -128,7 +128,7 @@ func (importer *FileImporter) Import(dir, importedPath string) *ImportedData {
|
||||
return &ImportedData{err: err}
|
||||
}
|
||||
|
||||
for i := 0; !found && i < len(importer.JPaths); i++ {
|
||||
for i := len(importer.JPaths) - 1; !found && i >= 0; i-- {
|
||||
found, content, foundHere, err = tryPath(importer.JPaths[i], importedPath)
|
||||
if err != nil {
|
||||
return &ImportedData{err: err}
|
||||
|
Loading…
x
Reference in New Issue
Block a user