compose exec doesn't need project

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-09-22 15:15:33 +02:00 • committed by Nicolas De loof
parent 9b055c31fe
commit 244834ff12
4 changed files with 11 additions and 34 deletions

View file

@ -21,7 +21,6 @@ import (
"fmt"
"os"
cgo "github.com/compose-spec/compose-go/cli"
"github.com/containerd/console"
"github.com/docker/cli/cli"
"github.com/spf13/cobra"
@ -78,7 +77,7 @@ func execCommand(p *projectOptions, backend api.Service) *cobra.Command {
}
func runExec(ctx context.Context, backend api.Service, opts execOpts) error {
project, err := opts.toProject(nil, cgo.WithResolvedPaths(true))
project, err := opts.toProjectName()
if err != nil {
return err
}