Merge pull request #21164 from rhatdan/quadlet
Error messages not being reported unless more then one error present
This commit is contained in:
commit
79e4779558
|
|
@ -230,7 +230,9 @@ func loadUnitsFromDir(sourcePath string) ([]*parser.UnitFile, error) {
|
|||
|
||||
if f, err := parser.ParseUnitFile(path); err != nil {
|
||||
err = fmt.Errorf("error loading %q, %w", path, err)
|
||||
if prevError != nil {
|
||||
if prevError == nil {
|
||||
prevError = err
|
||||
} else {
|
||||
prevError = fmt.Errorf("%s\n%s", prevError, err)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -639,6 +639,7 @@ BOGUS=foo
|
|||
session := podmanTest.Quadlet([]string{"-dryrun"}, podmanTest.TempDir)
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(1))
|
||||
Expect(session.ErrorToString()).To(ContainSubstring("converting \"bogus.container\": unsupported key 'BOGUS' in group 'Container' in " + quadletfilePath))
|
||||
})
|
||||
|
||||
It("Should scan and return output for files in subdirectories", func() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue