()
| 408 | var DefaultOverrideFileNames = []string{"compose.override.yml", "compose.override.yaml", "docker-compose.override.yml", "docker-compose.override.yaml"} |
| 409 | |
| 410 | func (o *ProjectOptions) GetWorkingDir() (string, error) { |
| 411 | if o.WorkingDir != "" { |
| 412 | return filepath.Abs(o.WorkingDir) |
| 413 | } |
| 414 | PATH: |
| 415 | for _, path := range o.ConfigPaths { |
| 416 | if path != "-" { |
| 417 | for _, l := range o.ResourceLoaders { |
| 418 | if l.Accept(path) { |
| 419 | break PATH |
| 420 | } |
| 421 | } |
| 422 | absPath, err := filepath.Abs(path) |
| 423 | if err != nil { |
| 424 | return "", err |
| 425 | } |
| 426 | return filepath.Dir(absPath), nil |
| 427 | } |
| 428 | } |
| 429 | return os.Getwd() |
| 430 | } |
| 431 | |
| 432 | // ReadConfigFiles reads ConfigFiles and populates the content field |
| 433 | func (o *ProjectOptions) ReadConfigFiles(ctx context.Context, workingDir string, options *ProjectOptions) (*types.ConfigDetails, error) { |
no test coverage detected