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:
Paul Holzinger 2026-07-20 18:14:45 +02:00
parent a9d7058eef
commit d3adfdeec7
No known key found for this signature in database
GPG key ID: EB145DD938A3CAF2

View file

@ -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))