Commit 9d66bea9 authored by Martin Craig's avatar Martin Craig Committed by Paul McCarthy
Browse files

Make error message more accurate in terms of what's actually gone wrong

The problem here is not that it can't find the folder but that FSLDIR
suggests a WSL installation but does not match the format required to
identify the distro folder.
parent 3a874cf2
......@@ -453,10 +453,10 @@ class Platform(notifier.Notifier):
distro = None
if distro is None:
raise RuntimeError("No WSL installations found at \\wsl$\ - a valid WSL 2.0 installation is required")
return "\\\\wsl$\\" + distro + wslpath.replace("/", "\\")
if not distro:
raise RuntimeError("Could not identify WSL installation from FSLDIR (%s)" % self.fsldir)
return "\\\\wsl$\\" + distro + wslpath.replace("/", "\\")
platform = Platform()
"""An instance of the :class:`Platform` class. Feel free to create your own
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment