compose verbose takes context

This commit is contained in:
William Banfield
2022-11-29 13:49:56 -05:00
parent 62e4fb0e70
commit b2740d39d8
2 changed files with 4 additions and 4 deletions

View File

@@ -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...)...)
}

View File

@@ -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")
},
})