mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-18 20:07:33 +00:00
minor style fixes to make the backport apply cleanly
To make the cherry-pick apply cleanly do some of the style changes we did on main first. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
a9d7058eef
commit
d3adfdeec7
1 changed files with 2 additions and 2 deletions
|
|
@ -335,13 +335,13 @@ func (ic *ContainerEngine) installQuadlet(_ context.Context, path, destName, ins
|
|||
return "", fmt.Errorf("%q is not a supported Quadlet file type", filepath.Ext(finalPath))
|
||||
}
|
||||
|
||||
var osFlags = os.O_CREATE | os.O_WRONLY
|
||||
osFlags := os.O_CREATE | os.O_WRONLY
|
||||
|
||||
if !replace {
|
||||
osFlags |= os.O_EXCL
|
||||
}
|
||||
|
||||
file, err := os.OpenFile(finalPath, osFlags, 0644)
|
||||
file, err := os.OpenFile(finalPath, osFlags, 0o644)
|
||||
if err != nil {
|
||||
if errors.Is(err, fs.ErrExist) && !replace {
|
||||
return "", fmt.Errorf("a Quadlet with name %s already exists, refusing to overwrite", filepath.Base(finalPath))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue