Skip to content

Commit 9459dd3

Browse files
Copilotlpcox
andauthored
Fix /etc/hosts append stderr suppression in non-root path
Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/5ba53afd-63d5-4103-b7e0-e20725f32cf6 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 7285b32 commit 9459dd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run_containerized.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ configure_host_dns() {
285285
# Add host.docker.internal mapping to /etc/hosts
286286
# Check if the entry already exists to avoid duplicates
287287
if ! grep -q "host.docker.internal" /etc/hosts 2>/dev/null; then
288-
if echo "$HOST_IP host.docker.internal" >> /etc/hosts 2>/dev/null; then
288+
if { echo "$HOST_IP host.docker.internal" >> /etc/hosts; } 2>/dev/null; then
289289
log_info "DNS mapping configured: $HOST_IP -> host.docker.internal"
290290
else
291291
log_warn "Cannot write to /etc/hosts (running as non-root?); host.docker.internal mapping skipped"

0 commit comments

Comments
 (0)