forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_plugin_command.go
26 lines (21 loc) · 1.2 KB
/
install_plugin_command.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package v2
import (
"os"
"code.cloudfoundry.org/cli/cf/cmd"
"code.cloudfoundry.org/cli/commands"
"code.cloudfoundry.org/cli/commands/flags"
)
type InstallPluginCommand struct {
OptionalArgs flags.InstallPluginArgs `positional-args:"yes"`
Force bool `short:"f" description:"Force install of plugin without confirmation"`
RegisteredRepository string `short:"r" description:"Name of a registered repository where the specified plugin is located"`
usage interface{} `usage:"CF_NAME install-plugin (LOCAL-PATH/TO/PLUGIN | URL | -r REPO_NAME PLUGIN_NAME) [-f]\n\n Prompts for confirmation unless '-f' is provided.\n\nEXAMPLES:\n CF_NAME install-plugin ~/Downloads/plugin-foobar\n CF_NAME install-plugin https://example.com/plugin-foobar_linux_amd64\n CF_NAME install-plugin -r My-Repo plugin-echo"`
relatedCommands interface{} `related_commands:"add-plugin-repo, list-plugin-repos, plugins"`
}
func (_ InstallPluginCommand) Setup(config commands.Config, ui commands.UI) error {
return nil
}
func (_ InstallPluginCommand) Execute(args []string) error {
cmd.Main(os.Getenv("CF_TRACE"), os.Args)
return nil
}