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

wslpath fails when pointed to the current directory with the -u option. #9606

Closed
1 of 2 tasks
andrewparlane opened this issue Feb 7, 2023 · 4 comments
Closed
1 of 2 tasks
Assignees

Comments

@andrewparlane
Copy link

andrewparlane commented Feb 7, 2023

Version

Microsoft Windows [Version 10.0.19045.2486]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #2311-Microsoft Tue Nov 08 17:09:00 PST 2022

Distro Version

Ubuntu 18.04

Other Software

No response

Repro Steps

After a clean install of Ubuntu 18.04 run: wslpath -u .

Same thing for "wslpath -u ../this_dir", where this_dir is the directory you're currently in.

Expected Behavior

The result should be: "." on stdout.

Actual Behavior

The result is: "wslpath: .", output to stderr

Diagnostic Logs

andrewp@vanadium:~/foo$ mkdir foo bar
andrewp@vanadium:~/foo$ cd foo
andrewp@vanadium:~/foo$ wslpath -u .
wslpath: .
andrewp@vanadium:~/foo$ wslpath -u ..
/home/andrewp/
andrewp@vanadium:~/foo$ wslpath -u ../foo
wslpath: ../foo
andrewp@vanadium:~/foo$ wslpath -u ../bar
/home/andrewp/bar

For reference on another PC:
Microsoft Windows [Version 10.0.19044.2486] // note: this is slightly different
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #2311-Microsoft Tue Nov 08 17:09:00 PST 2022
This works fine:

andrewp@DESKTOP-8GH03GT:~$ mkdir foo bar
andrewp@DESKTOP-8GH03GT:~$ cd foo
andrewp@DESKTOP-8GH03GT:~/foo$ wslpath -u .
.
andrewp@DESKTOP-8GH03GT:~/foo$ wslpath -u ..
/home/andrewp/
andrewp@DESKTOP-8GH03GT:~/foo$ wslpath -u ../foo
.
andrewp@DESKTOP-8GH03GT:~/foo$ wslpath -u ../bar
/home/andrewp/bar

Another difference is that "wsl -v" is a (powershell) command that works on the PC with the broken behaviour, but is not recognised on the PC with wslpath working correctly. This suggests that this issue is due to a newer version of WSL. I tried installing v0.70.4 but the issue remains. I'm not sure how to find out what version of wsl I have installed on my other PC since the wsl -v option is not available. Windows "Apps & Features" lists "Windows Subsystem For Linux Update" as v5.10.16 if that helps.

This bug is a bit annoying because the Intel Quartus tools require WSL 1, and make heavy use of wslpath.

@OneBlue OneBlue self-assigned this Feb 7, 2023
@benhillis
Copy link
Member

I believe this issue is resolved with newer versions of WSL? (The store version)

@OneBlue
Copy link
Collaborator

OneBlue commented Feb 7, 2023

I can reproduce the issue on latest Store WSL. I'll work on a fix.

@benhillis
Copy link
Member

@andrewparlane
Copy link
Author

confirmed as fixed. Thanks a lot for the quick turnaround.

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

No branches or pull requests

4 participants
@andrewparlane @OneBlue @benhillis and others