mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 10:04:43 +08:00
Fixed bad yaml handling
This commit is contained in:
@@ -25,12 +25,19 @@ func readYamlFile(filename string, path string, updateAll bool, docIndexInt int)
|
||||
|
||||
if errorReading == io.EOF {
|
||||
return handleEOF(updateAll, docIndexInt, currentIndex)
|
||||
} else if errorReading != nil {
|
||||
return errorReading
|
||||
}
|
||||
|
||||
var errorParsing error
|
||||
matchingNodes, errorParsing = appendDocument(matchingNodes, dataBucket, path, updateAll, docIndexInt, currentIndex)
|
||||
if errorParsing != nil {
|
||||
return errorParsing
|
||||
}
|
||||
if !updateAll && currentIndex == docIndexInt {
|
||||
log.Debug("all done")
|
||||
return nil
|
||||
}
|
||||
currentIndex = currentIndex + 1
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user