warn instead of error, lift logic to main.go

Signed-off-by: Evan Miller <miller.evan815@gmail.com>
This commit is contained in:
Evan Miller
2025-07-02 18:20:35 -07:00
parent 4b1f7bcb9a
commit 31b4efcaec
12 changed files with 46 additions and 27 deletions

View File

@ -2248,14 +2248,6 @@ func initServiceUnitFile(quadletUnitFile *parser.UnitFile, isUser bool, unitsInf
return nil, nil, err
}
// These Service keys cannot be used in a Quadlet unit
for _, key := range UnsupportedServiceKeys {
_, hasKey := quadletUnitFile.Lookup(ServiceGroup, key)
if hasKey {
return nil, nil, fmt.Errorf("using key %s in the Service group is not supported", key)
}
}
service := quadletUnitFile.Dup()
service.Filename = unitInfo.ServiceFileName()