MCPcopy
hub / github.com/docker/compose / getPluginBinaryPath

Method getPluginBinaryPath

pkg/compose/plugins.go:192–204  ·  view source on GitHub ↗
(provider string)

Source from the content-addressed store, hash-verified

190}
191
192func (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
206func (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)

Callers 1

runPluginMethod · 0.95

Calls 1

executableFunction · 0.70

Tested by

no test coverage detected