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

wslpath command does not return the windows path for home directory #3146

Closed
mmktomato opened this Issue May 4, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@mmktomato

mmktomato commented May 4, 2018

$ wslpath -w ~
wslpath: /path/to/home: Result not representable

Is this intended behavior? I expect following result:

$ wslpath -w ~
C:\Users\mkt\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\path\to\home

env

>ver

Microsoft Windows [Version 10.0.17134.1]
@0xbadfca11

This comment has been minimized.

0xbadfca11 commented May 5, 2018

WSL team says don't modify Linux files from Windows applications.
So I think that wslpath does not provide path conversion except /mnt for Windows applications interoperability.
If provided, will helps modify Linux files from Windows applications.

@mmktomato

This comment has been minimized.

mmktomato commented May 9, 2018

Ah~~~ I forgot the prerequisite.
I want to run like:

$ AutoHotkey64.exe $(wslpath -w ~/dotfiles/ImDisable.ahk)

This is completely read only.
I hope wslpath resolves paths other than /mnt.

@benhillis

This comment has been minimized.

Member

benhillis commented May 10, 2018

This is by-design for now. Since modifying files inside your Linux file system can cause issues, we do not want to make it easier for users to shoot themselves in the foot.

@benhillis benhillis added the bydesign label May 10, 2018

@mmktomato

This comment has been minimized.

mmktomato commented May 11, 2018

I see. I understand my demand is potentially dangerous.

@mmktomato mmktomato closed this May 11, 2018

@espoelstra

This comment has been minimized.

espoelstra commented Sep 12, 2018

You may be able to work around this using https://brianketelsen.com/going-overboard-with-wsl-metadata/ if you read the post and pay special attention to the "Update" section at the end.

@nic-hartley

This comment has been minimized.

nic-hartley commented Nov 8, 2018

@benhillis That's what --force and a warning is for. rm --no-preserve-root -rf / doesn't say Result not representable. Sometimes you want to do "stupid" things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment