mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 21:14:53 +00:00
compose verbose takes context
This commit is contained in:
@@ -103,8 +103,8 @@ func ExecCompose(ctx context.Context, dir string, args ...string) error {
|
||||
}
|
||||
|
||||
// ExecComposeVerbose runs a Docker Compose command for a testnet and displays its output.
|
||||
func ExecComposeVerbose(dir string, args ...string) error {
|
||||
return exec.CommandVerbose(context.Background(), append(
|
||||
func ExecComposeVerbose(ctx context.Context, dir string, args ...string) error {
|
||||
return exec.CommandVerbose(ctx, append(
|
||||
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
|
||||
args...)...)
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ func NewCLI() *CLI {
|
||||
Use: "logs",
|
||||
Short: "Shows the testnet logs",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return docker.ExecComposeVerbose(cli.testnet.Dir, "logs")
|
||||
return docker.ExecComposeVerbose(context.Background(), cli.testnet.Dir, "logs")
|
||||
},
|
||||
})
|
||||
|
||||
@@ -284,7 +284,7 @@ func NewCLI() *CLI {
|
||||
Use: "tail",
|
||||
Short: "Tails the testnet logs",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return docker.ExecComposeVerbose(cli.testnet.Dir, "logs", "--follow")
|
||||
return docker.ExecComposeVerbose(context.Background(), cli.testnet.Dir, "logs", "--follow")
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user