mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
fix kubectl diff panic
This commit is contained in:
parent
7b7aa58881
commit
4f13f2739a
@ -257,6 +257,7 @@ type InfoObject struct {
|
||||
Force bool
|
||||
ServerSideApply bool
|
||||
ForceConflicts bool
|
||||
genericclioptions.IOStreams
|
||||
}
|
||||
|
||||
var _ Object = &InfoObject{}
|
||||
@ -325,7 +326,7 @@ func (obj InfoObject) Merged() (runtime.Object, error) {
|
||||
ResourceVersion: resourceVersion,
|
||||
}
|
||||
|
||||
_, result, err := patcher.Patch(obj.Info.Object, modified, obj.Info.Source, obj.Info.Namespace, obj.Info.Name, nil)
|
||||
_, result, err := patcher.Patch(obj.Info.Object, modified, obj.Info.Source, obj.Info.Namespace, obj.Info.Name, obj.ErrOut)
|
||||
return result, err
|
||||
}
|
||||
|
||||
@ -492,6 +493,7 @@ func (o *DiffOptions) Run() error {
|
||||
Force: force,
|
||||
ServerSideApply: o.ServerSideApply,
|
||||
ForceConflicts: o.ForceConflicts,
|
||||
IOStreams: o.Diff.IOStreams,
|
||||
}
|
||||
|
||||
err = differ.Diff(obj, printer)
|
||||
|
Loading…
Reference in New Issue
Block a user