| 190 | } |
| 191 | |
| 192 | func (s *composeService) getPluginBinaryPath(provider string) (path string, err error) { |
| 193 | if provider == "compose" { |
| 194 | return "", errors.New("'compose' is not a valid provider type") |
| 195 | } |
| 196 | plugin, err := manager.GetPlugin(provider, s.dockerCli, &cobra.Command{}) |
| 197 | if err == nil { |
| 198 | path = plugin.Path |
| 199 | } |
| 200 | if errdefs.IsNotFound(err) { |
| 201 | path, err = exec.LookPath(executable(provider)) |
| 202 | } |
| 203 | return path, err |
| 204 | } |
| 205 | |
| 206 | func (s *composeService) setupPluginCommand(ctx context.Context, project *types.Project, service types.ServiceConfig, path, command string) (*exec.Cmd, error) { |
| 207 | cmdOptionsMetadata := s.getPluginMetadata(path, service.Provider.Type, project) |