mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
attach: Move the AttachFunc default function to the initializer
Fixes a partially constructed AttachOptions
This commit is contained in:
parent
e9de06d4df
commit
9abe17f0a0
@ -90,6 +90,7 @@ func NewAttachOptions(streams genericclioptions.IOStreams) *AttachOptions {
|
|||||||
IOStreams: streams,
|
IOStreams: streams,
|
||||||
},
|
},
|
||||||
Attach: &DefaultRemoteAttach{},
|
Attach: &DefaultRemoteAttach{},
|
||||||
|
AttachFunc: defaultAttachFunc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,8 +194,6 @@ func (o *AttachOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []s
|
|||||||
}
|
}
|
||||||
o.Config = config
|
o.Config = config
|
||||||
|
|
||||||
o.AttachFunc = defaultAttachFunc
|
|
||||||
|
|
||||||
if o.CommandName == "" {
|
if o.CommandName == "" {
|
||||||
o.CommandName = cmd.CommandPath()
|
o.CommandName = cmd.CommandPath()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user