Skip to content

Commit a46ce50

Browse files
committed
fix: write graphql call errors to stderr instead of stdout
1 parent b894f7d commit a46ce50

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

github.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,12 @@ func (c *Client) PushChange(ctx context.Context, headCommit string, change Chang
251251
}
252252

253253
if len(payload.Errors) != 0 {
254-
fmt.Printf("There were %d errors returned when creating the commit.\n", len(payload.Errors))
255-
fmt.Println("Input:")
256-
fmt.Println(string(queryJSON))
257-
for i, e := range payload.Errors {
258-
fmt.Printf("Error %d: %s\n", i+1, e.Message)
254+
log("There were %d errors returned when creating the commit.\n", len(payload.Errors))
255+
for _, e := range payload.Errors {
256+
log(" - %s\n", e.Message)
259257
}
258+
259+
log("\nInput data, for reference: %s", string(queryJSON))
260260
return "", errors.New("graphql response")
261261
}
262262

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package main
22

3-
const VERSION = "0.5.0"
3+
const VERSION = "0.5.1"

0 commit comments

Comments
 (0)