Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions cmd/nvidia-ctk-installer/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const (

// Options defines the shared options for the CLIs to configure containers runtimes.
type Options struct {
DropInConfig string
// TODO: Rename to TopLevelConfig
Config string
Socket string
// ExecutablePath specifies the path to the container runtime executable.
Expand Down Expand Up @@ -71,8 +73,12 @@ func (o Options) Unconfigure(cfg engine.Interface) error {

// flush flushes the specified config to disk
func (o Options) flush(cfg engine.Interface) error {
logrus.Infof("Flushing config to %v", o.Config)
n, err := cfg.Save(o.Config)
filepath := o.DropInConfig
if filepath == "" {
filepath = o.Config
}
logrus.Infof("Flushing config to %v", filepath)
n, err := cfg.Save(filepath)
if err != nil {
return fmt.Errorf("unable to flush config: %v", err)
}
Expand Down
Loading
Loading