From c68bab44a599e38ad1ffe447d24e90bd78176140 Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Wed, 4 Jan 2023 16:00:59 -0800 Subject: [PATCH] Tools: fix wsl2 sim_vehicle.py host IP check --- Tools/autotest/sim_vehicle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/autotest/sim_vehicle.py b/Tools/autotest/sim_vehicle.py index 857344ed25..f402cd751c 100755 --- a/Tools/autotest/sim_vehicle.py +++ b/Tools/autotest/sim_vehicle.py @@ -204,7 +204,7 @@ def wsl2_host_ip(): if not under_wsl2(): return None - pipe = subprocess.Popen("grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'", + pipe = subprocess.Popen("route -n | grep eth0 | grep '^0[.]0[.]0[.]0' | tr -s ' ' | cut -f 2 -d ' '", shell=True, stdout=subprocess.PIPE) output_lines = pipe.stdout.read().decode('utf-8').strip(' \r\n')