Skip to content

Commit

Permalink
fix(compose): fix exec: "docker-compose": executable file not found i…
Browse files Browse the repository at this point in the history
…n $PATH

Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
  • Loading branch information
alexey-igrychev committed Nov 28, 2024
1 parent 06c691d commit 5d6ad64
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions cmd/werf/compose/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@ func newCmd(ctx context.Context, composeCmdName string, options *newCmdOptions)
cmdData.ComposeCommandOptions = strings.Fields(cmdData.RawComposeCommandOptions)
}

if err := checkComposeBin(cmdData); err != nil {
return err
}

return runMain(ctx, composeCmdName, cmdData, commonCmdData, options.FollowSupport)
},
})
Expand Down Expand Up @@ -351,18 +347,6 @@ func newCmd(ctx context.Context, composeCmdName string, options *newCmdOptions)
return cmd
}

func checkComposeBin(cmdData composeCmdData) error {
dockerComposeBinPath := "docker-compose"
if cmdData.ComposeBinPath != "" {
dockerComposeBinPath = cmdData.ComposeBinPath
}

if _, err := exec.LookPath(dockerComposeBinPath); err != nil {
return fmt.Errorf("%s: %w", dockerComposeBinPath, err)
}
return nil
}

func processArgs(cmdData *composeCmdData, cmd *cobra.Command, args []string) {
doubleDashInd := cmd.ArgsLenAtDash()
doubleDashExist := cmd.ArgsLenAtDash() != -1
Expand Down

0 comments on commit 5d6ad64

Please sign in to comment.