Skip to content

Commit 8650ca6

Browse files
committed
[no-relnote] Move hookCreator initialisation for readability
Signed-off-by: Evan Lezar <[email protected]>
1 parent 1bc2a9f commit 8650ca6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/runtime/runtime_factory.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ func newSpecModifier(logger logger.Interface, cfg *config.Config, ociSpec oci.Sp
8181
return nil, err
8282
}
8383

84-
hookCreator := discover.NewHookCreator(discover.WithNVIDIACDIHookPath(cfg.NVIDIACTKConfig.Path))
85-
8684
mode := info.ResolveAutoMode(logger, cfg.NVIDIAContainerRuntimeConfig.Mode, image)
8785
// We update the mode here so that we can continue passing just the config to other functions.
8886
cfg.NVIDIAContainerRuntimeConfig.Mode = mode
@@ -91,6 +89,7 @@ func newSpecModifier(logger logger.Interface, cfg *config.Config, ociSpec oci.Sp
9189
return nil, err
9290
}
9391

92+
hookCreator := discover.NewHookCreator(discover.WithNVIDIACDIHookPath(cfg.NVIDIACTKConfig.Path))
9493
var modifiers modifier.List
9594
for _, modifierType := range supportedModifierTypes(mode) {
9695
switch modifierType {

0 commit comments

Comments
 (0)