Add –noprofile to detect WSL IP address to speed up things

This commit is contained in:
Dirk Baeumer 2020-05-05 14:44:56 +02:00
parent 1db9228d40
commit 177b9c30ea

View file

@ -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 | Write-Host -NoNewline}")
HOST_IP=$(powershell.exe noprofile -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