Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detection of WSL when starting the debug container #196

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

LeeSaferite
Copy link
Contributor

The current code for warden debug does not detect WSL based environments and instead identifies them as standard Linux. This becomes a problem when trying to configure the Xdebug remote connect address. The Windows version of Docker has the magic "host.docker.internal" hostname that the Linux version of Docker does not have. Additionally, the fallback method of remote IP detection fails to generate the correct IP address on a WSL setup. This test is the suggested way of detecting a WSL Linux system.

microsoft/WSL#423 (comment)

@complexthings
Copy link

Windows, HA

@davidalger davidalger added the enhancement New feature or request label Jul 23, 2020
@davidalger
Copy link
Collaborator

@LeeSaferite When you tested this, was it on WSL1 or WSL2?

@LeeSaferite
Copy link
Contributor Author

This is on WSL1.

The release name contains microsoft-standard on WSL2.

davidalger added a commit that referenced this pull request Jul 27, 2020
@davidalger davidalger merged commit be4101d into wardenenv:develop Jul 27, 2020
@davidalger davidalger added this to the Warden 0.8.0 milestone Jul 27, 2020
@davidalger
Copy link
Collaborator

Verified this doesn't change behavior on either macOS nor on Fedora 31. Looks good. Thanks for the contribution @LeeSaferite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants