mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
Tools: fix wsl2 sim_vehicle.py host IP check
This commit is contained in:
parent
b64cec7e36
commit
c68bab44a5
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user