You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(#9400 P2b) host: docker: replace seven echo|grep subshells with here-strings
Seven near-identical `echo "${DOCKER_INFO}" | grep -i -e <key>: | cut -d : -f 2 | xargs echo -n`
chains parse fields out of cached `docker info` output. Replace each with
`grep -i -e <key>: <<< "${DOCKER_INFO}" | cut -d : -f 2 | xargs echo -n`.
The here-string and `echo "${DOCKER_INFO}"` produce the same bytes on
stdin (one trailing newline), so grep, cut and xargs see identical input
and emit the same field value. The change drops one subshell + one echo
process per invocation; `get_docker_info_once` runs these in a tight
sequence at the top of every Docker-mode build.
Part of #9400 (P2b).
Assisted-by: Claude:claude-opus-4.7
0 commit comments