Skip to content

Commit 38da2b1

Browse files
author
James Alseth
authored
Include more details in error for conftest pull (#1)
1 parent a077147 commit 38da2b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ func getFullPullURL() (string, error) {
142142

143143
func runConftestPull(url string) error {
144144
cmd := exec.Command("conftest", "pull", url)
145+
var out bytes.Buffer
146+
cmd.Stderr = &out
145147
if err := cmd.Run(); err != nil {
146-
return fmt.Errorf("running conftest pull: %w", err)
148+
return fmt.Errorf("running conftest pull: %s", out.String())
147149
}
148150

149151
return nil

0 commit comments

Comments
 (0)