mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
collapse printing paths
This commit is contained in:
@@ -298,9 +298,9 @@ func RunApply(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, opti
|
||||
|
||||
count++
|
||||
if len(output) > 0 && !shortOutput {
|
||||
return f.PrintResourceInfoForCommand(cmd, info, out)
|
||||
return cmdutil.PrintObject(cmd, info.Object, out)
|
||||
}
|
||||
f.PrintSuccess(shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "created")
|
||||
cmdutil.PrintSuccess(shortOutput, out, info.Object, dryRun, "created")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -345,15 +345,15 @@ func RunApply(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, opti
|
||||
|
||||
if string(patchBytes) == "{}" {
|
||||
count++
|
||||
f.PrintSuccess(shortOutput, out, info.Mapping.Resource, info.Name, false, "unchanged")
|
||||
cmdutil.PrintSuccess(shortOutput, out, info.Object, false, "unchanged")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
count++
|
||||
if len(output) > 0 && !shortOutput {
|
||||
return f.PrintResourceInfoForCommand(cmd, info, out)
|
||||
return cmdutil.PrintObject(cmd, info.Object, out)
|
||||
}
|
||||
f.PrintSuccess(shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "configured")
|
||||
cmdutil.PrintSuccess(shortOutput, out, info.Object, dryRun, "configured")
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -520,7 +520,7 @@ func (p *pruner) prune(f cmdutil.Factory, namespace string, mapping *meta.RESTMa
|
||||
return err
|
||||
}
|
||||
}
|
||||
f.PrintSuccess(shortOutput, p.out, mapping.Resource, name, p.dryRun, "pruned")
|
||||
cmdutil.PrintSuccess(shortOutput, p.out, obj, p.dryRun, "pruned")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user