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

Method SetDependency

cf/commands/application/copy_source.go:69–84  ·  view source on GitHub ↗
(deps commandregistry.Dependency, pluginCall bool)

Source from the content-addressed store, hash-verified

67}
68
69func (cmd *CopySource) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
70 cmd.ui = deps.UI
71 cmd.config = deps.Config
72 cmd.authRepo = deps.RepoLocator.GetAuthenticationRepository()
73 cmd.appRepo = deps.RepoLocator.GetApplicationRepository()
74 cmd.orgRepo = deps.RepoLocator.GetOrganizationRepository()
75 cmd.spaceRepo = deps.RepoLocator.GetSpaceRepository()
76 cmd.copyAppSourceRepo = deps.RepoLocator.GetCopyApplicationSourceRepository()
77
78 // get command from registry for dependency
79 commandDep := commandregistry.Commands.FindCommand("restart")
80 commandDep = commandDep.SetDependency(deps, false)
81 cmd.appRestart = commandDep.(Restarter)
82
83 return cmd
84}
85
86func (cmd *CopySource) Execute(c flags.FlagContext) error {
87 sourceAppName := c.Args()[0]

Callers

nothing calls this directly

Calls 7

GetSpaceRepositoryMethod · 0.80
FindCommandMethod · 0.80
SetDependencyMethod · 0.65

Tested by

no test coverage detected