Skip to content

Commit 9da9746

Browse files
committed
Hook up std{in,out,err} in wasm commands
Signed-off-by: Tyler Rockwood <[email protected]>
1 parent 107a7bd commit 9da9746

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/go/rpk/pkg/cli/wasm/build.go

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package wasm
22

33
import (
44
"fmt"
5+
"os"
56
"os/exec"
67

78
"github.com/redpanda-data/redpanda/src/go/rpk/pkg/out"
@@ -32,6 +33,9 @@ func newBuildCommand(fs afero.Fs) *cobra.Command {
3233
"-gc=conservative",
3334
"-o", fmt.Sprintf("%s.wasm", cfg.Name),
3435
".")
36+
c.Stderr = os.Stderr
37+
c.Stdin = os.Stdin
38+
c.Stdout = os.Stdout
3539
out.MaybeDieErr(c.Run())
3640
default:
3741
out.Die("unknown language: %q", cfg.Language)

src/go/rpk/pkg/cli/wasm/initialize.go

+3
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ func installDeps(ctx context.Context, p transformProject) error {
179179
g, err := exec.LookPath("go")
180180
out.MaybeDie(err, "go is not available on $PATH, please download and install it: https://go.dev/doc/install")
181181
c := exec.CommandContext(ctx, g, "mod", "tidy")
182+
c.Stderr = os.Stderr
183+
c.Stdin = os.Stdin
184+
c.Stdout = os.Stdout
182185
c.Dir = p.Path
183186
out.MaybeDieErr(c.Run())
184187
fmt.Println("go modules are tidy 🧹")

0 commit comments

Comments
 (0)