(c flags.FlagContext)
| 558 | } |
| 559 | |
| 560 | func (cmd *Push) getAppParamsFromManifest(c flags.FlagContext) ([]models.AppParams, error) { |
| 561 | if c.Bool("no-manifest") { |
| 562 | return []models.AppParams{}, nil |
| 563 | } |
| 564 | |
| 565 | var path string |
| 566 | if c.String("f") != "" { |
| 567 | path = c.String("f") |
| 568 | } else { |
| 569 | var err error |
| 570 | path, err = os.Getwd() |
| 571 | if err != nil { |
| 572 | return nil, errors.New(fmt.Sprint(T("Could not determine the current working directory!"), err)) |
| 573 | } |
| 574 | } |
| 575 | |
| 576 | m, err := cmd.manifestRepo.ReadManifest(path) |
| 577 | |
| 578 | if err != nil { |
| 579 | if m.Path == "" && c.String("f") == "" { |
| 580 | return []models.AppParams{}, nil |
| 581 | } |
| 582 | return nil, errors.New(T("Error reading manifest file:\n{{.Err}}", map[string]interface{}{"Err": err.Error()})) |
| 583 | } |
| 584 | |
| 585 | apps, err := m.Applications() |
| 586 | if err != nil { |
| 587 | return nil, errors.New(T("Error reading manifest file:\n{{.Err}}", map[string]interface{}{"Err": err.Error()})) |
| 588 | } |
| 589 | |
| 590 | cmd.ui.Say(T("Using manifest file {{.Path}}\n", |
| 591 | map[string]interface{}{"Path": terminal.EntityNameColor(m.Path)})) |
| 592 | return apps, nil |
| 593 | } |
| 594 | |
| 595 | func (cmd *Push) createAppSetFromContextAndManifest(contextApp models.AppParams, manifestApps []models.AppParams) ([]models.AppParams, error) { |
| 596 | var err error |
no test coverage detected