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

Commit

Permalink
Fix errors after bump compose to 2.24.6 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 authored Feb 29, 2024
1 parent a499eb9 commit 01054bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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

0 comments on commit 01054bf

Please sign in to comment.