We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a35c66 commit ec4c23dCopy full SHA for ec4c23d
1 file changed
internal/librarian/java/generate.go
@@ -23,6 +23,7 @@ import (
23
"path/filepath"
24
"strings"
25
26
+ "github.com/googleapis/librarian/internal/command"
27
"github.com/googleapis/librarian/internal/config"
28
)
29
@@ -60,9 +61,7 @@ func Format(ctx context.Context, library *config.Library) error {
60
61
}
62
63
args := append([]string{"--replace"}, files...)
- cmd := exec.CommandContext(ctx, "google-java-format", args...)
64
- cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr
65
- if err := cmd.Run(); err != nil {
+ if err := command.Run(ctx, "google-java-format", args...); err != nil {
66
return fmt.Errorf("formatting failed: %w", err)
67
68
return nil
0 commit comments