mirror of https://github.com/containers/podman.git
Quadlet: exit 0 when there are no files to process
Quadlet should not exit with failure if no files to process have been found. Otherwise, even simple operations such as reloading systemd will fail as it retriggers generators. Fixes: #17374 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
parent
dcbe0182a9
commit
f1352521ff
|
@ -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 {
|
||||
|
|
|
@ -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]"
|
||||
|
|
Loading…
Reference in New Issue