Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Fix errors after bump compose to 2.24.6 #17

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/teachart/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ func runLint(ctx context.Context, cmd *cobra.Command, opts lintOptions) error {
cli.WithNormalization(!opts.noNormalize),
cli.WithConsistency(!opts.noConsistency),
cli.WithDiscardEnvFile,
cli.WithContext(ctx),
}

lintFn := func(chartDir string) ([]byte, error) {
Expand Down
11 changes: 5 additions & 6 deletions pkg/compose/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ func NewClient(services []string, projectOpts *compose_cmd.ProjectOptions) (*Cli
}, nil
}

func (c *Client) toProject(pofs []cli.ProjectOptionsFn) (*types.Project, error) {
return c.ProjectOptions.ToProject(c.dockerCli, c.services, pofs...)
func (c *Client) toProject(ctx context.Context, pofs []cli.ProjectOptionsFn) (*types.Project, error) {
project, _, err := c.ProjectOptions.ToProject(ctx, c.dockerCli, c.services, pofs...)
return project, err
}

func (c *Client) Up(ctx context.Context, createOpts api.CreateOptions, startOpts api.StartOptions) error {
project, err := c.toProject([]cli.ProjectOptionsFn{
project, err := c.toProject(ctx, []cli.ProjectOptionsFn{
cli.WithResolvedPaths(true),
cli.WithDiscardEnvFile,
cli.WithContext(ctx),
})
if err != nil {
return err
Expand All @@ -73,10 +73,9 @@ func (c *Client) Down(ctx context.Context, downOpts api.DownOptions) error {
}

func (c *Client) Config(ctx context.Context, pofs []cli.ProjectOptionsFn, configOpts api.ConfigOptions) ([]byte, error) {
project, err := c.toProject([]cli.ProjectOptionsFn{
project, err := c.toProject(ctx, []cli.ProjectOptionsFn{
cli.WithResolvedPaths(true),
cli.WithDiscardEnvFile,
cli.WithContext(ctx),
})
if err != nil {
return nil, err
Expand Down