Skip to content

Commit 47970d2

Browse files
stilvoidsthulb
authored andcommitted
Capture output from go fmt (#107)
1 parent 5ff733e commit 47970d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/rpdk/go/codegen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ def generate(self, project):
166166
# named files must all be in one directory
167167
for path in format_paths:
168168
try:
169-
subprocess_run(["go", "fmt", path], cwd=root, check=True)
169+
subprocess_run(
170+
["go", "fmt", path], cwd=root, check=True, capture_output=True
171+
)
170172
except (FileNotFoundError, CalledProcessError) as e:
171173
raise DownstreamError("go fmt failed") from e
172174

0 commit comments

Comments
 (0)