(cmd *cobra.Command, out communityScriptInstallOutput)
| 413 | } |
| 414 | |
| 415 | func printInstallResult(cmd *cobra.Command, out communityScriptInstallOutput) error { |
| 416 | if getOutputFormat(cmd) == outputTable { |
| 417 | printTable([]string{"FIELD", "VALUE"}, [][]string{ |
| 418 | {"Node", out.Node}, |
| 419 | {"Host", out.Host}, |
| 420 | {"SSH User", out.SSHUser}, |
| 421 | {"Script", out.Script.Slug}, |
| 422 | {"Non-interactive", fmt.Sprintf("%t", out.NonInteractive)}, |
| 423 | {"Overrides", formatCommunityScriptEnv(out.Env)}, |
| 424 | {"Created Guests", formatGuestOutputs(out.CreatedGuests)}, |
| 425 | {"Warnings", strings.Join(out.Warnings, "; ")}, |
| 426 | {"Exit Code", fmt.Sprintf("%d", out.ExitCode)}, |
| 427 | }) |
| 428 | return nil |
| 429 | } |
| 430 | |
| 431 | return printJSON(out) |
| 432 | } |
| 433 | |
| 434 | func printCommunityScriptPlanTable(plan communityScriptPlanOutput) { |
| 435 | printTable([]string{"FIELD", "VALUE"}, [][]string{ |
no test coverage detected