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

getWslDrivesMountPoint Cannot read property '1' of null #223

Closed
Marshal27 opened this issue Feb 15, 2021 · 3 comments · Fixed by #224
Closed

getWslDrivesMountPoint Cannot read property '1' of null #223

Marshal27 opened this issue Feb 15, 2021 · 3 comments · Fixed by #224

Comments

@Marshal27
Copy link

Marshal27 commented Feb 15, 2021

I am getting the above error on this line for WSL2. The contents of my wsl.conf are

[network]
generateResolvConf = true

Removing [1] allows my dev server to start however, the mount point is still wrong and is /... statically setting the value to /mnt/ allows everything to run as expected.

                mountPoint = (/root\s*=\s*(.*)/g.exec(configContent) || '').trim();
		mountPoint = mountPoint.endsWith('/') ? mountPoint : mountPoint + '/';

		return '/mnt/';

This was introduced here
https://github.com/sindresorhus/open/pull/219/files

open/index.js

Line 46 in f0533c0

mountPoint = (/root\s*=\s*(.*)/g.exec(configContent)[1] || '').trim();

@sindresorhus
Copy link
Owner

// @kalexey89

kuzalekon added a commit to kuzalekon/open that referenced this issue Feb 16, 2021
@kuzalekon
Copy link
Contributor

@sindresorhus @Marshal27

I fixed this in #224 PR.

@Marshal27
Copy link
Author

@kalexey89 @sindresorhus

Thank you for the quick turnaround!

confirmed #224 PR resolves the issue for my scenario.

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

Successfully merging a pull request may close this issue.

3 participants