check docker-compose version

This commit is contained in:
2021-10-23 22:16:42 +02:00
parent b172d8f43d
commit 8a91f699b8
4 changed files with 7 additions and 2 deletions

View File

@ -18,6 +18,7 @@ import (
const DockerComposeVersion = ">= 1.28.6"
func CheckDockerComposeVersion() {
// cmd := exec.Command("docker-compose", "--version")
cmd := exec.Command("docker-compose", "--version")
var output bytes.Buffer
cmd.Stdout = &output
@ -124,9 +125,10 @@ func ExecComposerRestart(ctx *context.LedoContext) {
ctx.ExecCmd("docker-compose", args[0:])
}
func ExecComposerLogs(ctx *context.LedoContext) {
func ExecComposerLogs(ctx *context.LedoContext, command cli.Args) {
args := ctx.ComposeArgs
args = append(args, "logs", "--follow", "--tail", "100")
args = append(args, command.Slice()...)
ctx.ExecCmd("docker-compose", args[0:])
}