MCPcopy Index your code
hub / github.com/cloudfoundry/cli / SetDependency

Method SetDependency

cf/commands/plugin/install_plugin.go:74–93  ·  view source on GitHub ↗
(deps commandregistry.Dependency, pluginCall bool)

Source from the content-addressed store, hash-verified

72}
73
74func (cmd *PluginInstall) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
75 cmd.ui = deps.UI
76 cmd.config = deps.Config
77 cmd.pluginConfig = deps.PluginConfig
78 cmd.pluginRepo = deps.PluginRepo
79 cmd.checksum = deps.ChecksumUtil
80
81 // reset rpc registration in case there is other running instance,
82 // each service can only be registered once
83 server := rpc.NewServer()
84
85 rpcService, err := pluginRPCService.NewRpcService(deps.TeePrinter, deps.TeePrinter, deps.Config, deps.RepoLocator, pluginRPCService.NewCommandRunner(), deps.Logger, cmd.ui.Writer(), server)
86 if err != nil {
87 cmd.ui.Failed("Error initializing RPC service: " + err.Error())
88 }
89
90 cmd.rpcService = rpcService
91
92 return cmd
93}
94
95func (cmd *PluginInstall) Execute(c flags.FlagContext) error {
96 if !cmd.confirmWithUser(

Callers

nothing calls this directly

Calls 3

WriterMethod · 0.65
FailedMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected