(cmd *cobra.Command, args []string)
| 187 | } |
| 188 | |
| 189 | func runCommunityScriptsShow(cmd *cobra.Command, args []string) error { |
| 190 | session, err := initCLISession(cmd) |
| 191 | if err != nil { |
| 192 | return printError(err) |
| 193 | } |
| 194 | if session == nil { |
| 195 | return nil |
| 196 | } |
| 197 | if err := ensureCommunityScriptsEnabled(session); err != nil { |
| 198 | return printError(err) |
| 199 | } |
| 200 | |
| 201 | script, err := findCommunityScript(args[0]) |
| 202 | if err != nil { |
| 203 | return printError(err) |
| 204 | } |
| 205 | |
| 206 | out := communityScriptToOutput(script) |
| 207 | if getOutputFormat(cmd) == outputTable { |
| 208 | printCommunityScriptDetailsTable(out) |
| 209 | return nil |
| 210 | } |
| 211 | |
| 212 | return printJSON(out) |
| 213 | } |
| 214 | |
| 215 | func runCommunityScriptsPlan(cmd *cobra.Command, args []string) error { |
| 216 | plan, err := buildCommunityScriptPlan(cmd, args[0]) |
nothing calls this directly
no test coverage detected