Merge pull request #17398 from vrothberg/fix-17374

Quadlet: exit 0 when there are no files to process
This commit is contained in:
OpenShift Merge Robot
2023-02-07 10:57:43 -05:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@ -327,8 +327,10 @@ func main() {
}
if len(units) == 0 {
// containers/podman/issues/17374: exit cleanly but log that we
// had nothing to do
Debugf("No files to parse from %s", sourcePaths)
os.Exit(1)
os.Exit(0)
}
if !dryRun {

View File

@ -365,7 +365,7 @@ var _ = Describe("quadlet system generator", func() {
session := podmanTest.Quadlet([]string{"-dryrun"}, "/something")
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(1))
Expect(session).Should(Exit(0))
current := session.ErrorToStringArray()
expected := "No files to parse from [/something]"