Return unmodified runtime if specModifier is nil

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2022-04-08 07:38:19 +02:00
parent 99baea9d51
commit 67602b28f9
3 changed files with 55 additions and 6 deletions

View File

@@ -48,10 +48,6 @@ func newNVIDIAContainerRuntime(logger *logrus.Logger, cfg *config.Config, argv [
if err != nil {
return nil, fmt.Errorf("failed to construct OCI spec modifier: %v", err)
}
if specModifier == nil {
logger.Infof("Using low-level runtime with no modification")
return lowLevelRuntime, nil
}
// Create the wrapping runtime with the specified modifier
r := runtime.NewModifyingRuntimeWrapper(