(deps commandregistry.Dependency, pluginCall bool)
| 67 | } |
| 68 | |
| 69 | func (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 | |
| 86 | func (cmd *CopySource) Execute(c flags.FlagContext) error { |
| 87 | sourceAppName := c.Args()[0] |
nothing calls this directly
no test coverage detected