check docker-compose version
This commit is contained in:
@ -16,7 +16,7 @@ var CmdComposeLogs = cli.Command{
|
||||
|
||||
func RunComposeLogs(cmd *cli.Context) error {
|
||||
ctx := context.InitCommand(cmd)
|
||||
compose.ExecComposerLogs(ctx)
|
||||
compose.ExecComposerLogs(ctx, cmd.Args())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ var CmdDockerUp = cli.Command{
|
||||
func RunComposeUp(cmd *cli.Context) error {
|
||||
ctx := context.InitCommand(cmd)
|
||||
compose.ExecComposerUp(ctx)
|
||||
compose.ExecComposerLogs(ctx, cmd.Args())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -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:])
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user