We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b3561a commit a1c10d1Copy full SHA for a1c10d1
google_metadata_script_runner/main.go
@@ -319,13 +319,20 @@ func runCmd(c *exec.Cmd, name string) error {
319
pw.Close()
320
321
in := bufio.NewScanner(pr)
322
- for in.Scan() {
+ for {
323
+ if !in.Scan() {
324
+ if err := in.Err(); err != nil {
325
+ logger.Errorf("error while communicating with %q script: %v", name, err)
326
+ }
327
+ break
328
329
logger.Log(logger.LogEntry{
330
Message: fmt.Sprintf("%s: %s", name, in.Text()),
331
CallDepth: 3,
332
Severity: logger.Info,
333
})
334
}
335
+ pr.Close()
336
337
return c.Wait()
338
0 commit comments