mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #13444 from hurf/run_out
Change default output of `run` command
This commit is contained in:
commit
7fc1fe2dd9
@ -220,7 +220,13 @@ func Run(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cob
|
||||
return fmt.Errorf("cannot attach to %s: not implemented", kind)
|
||||
}
|
||||
}
|
||||
return f.PrintObject(cmd, obj, cmdOut)
|
||||
|
||||
outputFormat := cmdutil.GetFlagString(cmd, "output")
|
||||
if outputFormat != "" {
|
||||
return f.PrintObject(cmd, obj, cmdOut)
|
||||
}
|
||||
cmdutil.PrintSuccess(mapper, false, cmdOut, mapping.Resource, args[0], "created")
|
||||
return nil
|
||||
}
|
||||
|
||||
func waitForPodRunning(c *client.Client, pod *api.Pod, out io.Writer) error {
|
||||
|
Loading…
Reference in New Issue
Block a user