use windows DISPLAY when running code.sh client within WSL

This commit is contained in:
João Moreno 2020-03-30 14:33:49 +02:00
parent b2989ab109
commit 793499665b

View file

@ -55,6 +55,9 @@ function code() {
function code-wsl()
{
HOST_IP=$(powershell.exe -Command "& {(Get-NetIPAddress | Where-Object {\$_.InterfaceAlias -like '*WSL*' -and \$_.AddressFamily -eq 'IPv4'}).IPAddress}")
export DISPLAY="$HOST_IP:0"
# in a wsl shell
ELECTRON="$ROOT/.build/electron/Code - OSS.exe"
if [ -f "$ELECTRON" ]; then