containers / toolbox

Tool for interactive command line environments on Linux
https://containertoolbx.org/
Apache License 2.0
2.51k stars 214 forks source link

cmd/utils: Increase buffer size when discarding terminal input #1427

Closed HarryMichal closed 9 months ago

HarryMichal commented 9 months ago

Without a sufficient buffer size the discard function does not read fast/efficiently enough causing multiple lines indicating "passed and discarded input" to show up.

I used an already defined constant[0] for the buffer size to prevent the use of a yet-another magical constant.

[0] https://pkg.go.dev/bytes#pkg-constants

softwarefactory-project-zuul[bot] commented 9 months ago

Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/716a9381a79f493a9b0088d6a15522fc

:heavy_check_mark: unit-test SUCCESS in 6m 59s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 16s :heavy_check_mark: unit-test-restricted SUCCESS in 6m 13s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 38m 34s :heavy_check_mark: system-test-fedora-39 SUCCESS in 37m 10s :heavy_check_mark: system-test-fedora-38 SUCCESS in 37m 39s

softwarefactory-project-zuul[bot] commented 9 months ago

Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/f1366122016b43eda9c470319a5a32d5

:heavy_check_mark: unit-test SUCCESS in 6m 53s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 11s :heavy_check_mark: unit-test-restricted SUCCESS in 5m 59s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 30m 41s :heavy_check_mark: system-test-fedora-39 SUCCESS in 28m 51s :heavy_check_mark: system-test-fedora-38 SUCCESS in 27m 09s