diff --git a/scripts/code.sh b/scripts/code.sh index efa6daa9371..3bc09f54f4e 100755 --- a/scripts/code.sh +++ b/scripts/code.sh @@ -55,7 +55,7 @@ function code() { function code-wsl() { - HOST_IP=$(powershell.exe -Command "& {(Get-NetIPAddress | Where-Object {\$_.InterfaceAlias -like '*WSL*' -and \$_.AddressFamily -eq 'IPv4'}).IPAddress}") + HOST_IP=$(powershell.exe -Command "& {(Get-NetIPAddress | Where-Object {\$_.InterfaceAlias -like '*WSL*' -and \$_.AddressFamily -eq 'IPv4'}).IPAddress | Write-Host -NoNewline}") export DISPLAY="$HOST_IP:0" # in a wsl shell