mirror of
https://github.com/containers/podman.git
synced 2025-08-02 09:12:36 +08:00
fix logic when not creating a workdir
When resolving the workdir of a container, we may need to create unless the user set it explicitly on the command line. Otherwise, we just do a presence check. Unfortunately, there was a missing return that lead us to fall through into attempting to create and chown the workdir. That caused a regression when running on a read-only root fs. Fixes: #9230 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -213,6 +213,7 @@ func (c *Container) resolveWorkDir() error {
|
||||
// we need to return the full error.
|
||||
return errors.Wrapf(err, "error detecting workdir %q on container %s", workdir, c.ID())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Ensure container entrypoint is created (if required).
|
||||
|
Reference in New Issue
Block a user