Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
}
}()
scanner := bufio.NewScanner(f)
scanner.Buffer(nil, 1024*1024*1024) // increase buffer to 1GB to avoid scanner buffer overflow

Check warning on line 290 in cmd/root.go

View check run for this annotation

Codecov / codecov/patch

cmd/root.go#L290

Added line #L290 was not covered by tests
for scanner.Scan() {
arg := os.ExpandEnv(strings.TrimSpace(scanner.Text()))

Expand Down
3 changes: 2 additions & 1 deletion pkg/container/parse_env_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func parseEnvFile(e Container, srcPath string, env *map[string]string) common.Ex
return err
}
s := bufio.NewScanner(reader)
s.Buffer(nil, 1024*1024*1024) // increase buffer to 1GB to avoid scanner buffer overflow
firstLine := true
for s.Scan() {
line := s.Text()
Expand Down Expand Up @@ -63,6 +64,6 @@ func parseEnvFile(e Container, srcPath string, env *map[string]string) common.Ex
}
}
env = &localEnv
return nil
return s.Err()
}
}
3 changes: 2 additions & 1 deletion pkg/runner/run_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ func (rc *RunContext) UpdateExtraPath(ctx context.Context, githubEnvPath string)
return err
}
s := bufio.NewScanner(reader)
s.Buffer(nil, 1024*1024*1024) // increase buffer to 1GB to avoid scanner buffer overflow
firstLine := true
for s.Scan() {
line := s.Text()
Expand All @@ -576,7 +577,7 @@ func (rc *RunContext) UpdateExtraPath(ctx context.Context, githubEnvPath string)
rc.addPath(ctx, line)
}
}
return nil
return s.Err()
}

// stopJobContainer removes the job container (if it exists) and its volume (if it exists)
Expand Down