wslutilities / wslu

A collection of utilities for Windows Subsystem for Linux
https://wslutiliti.es/wslu
GNU General Public License v3.0
3.44k stars 155 forks source link

wslu guesses wrong path #310

Closed Schievel1 closed 6 months ago

Schievel1 commented 6 months ago

Windows Version

Windows 10

Windows Build Number

19045

WSL Version

WSL 2

Distro Version

Gentoo amd64 (stable)

WSL Utilities Version

4.1.1

Describe the bug

When I do wslview . for example, the path to the folder in wsl is resolved to /lxss/... Example:

➜ wslview --debug .
[debug:/usr/bin/wslview] Showing debug output.
[debug:/usr/bin/wslview] source default setting
[debug:/usr/bin/wslview] /etc/wslu/conf found, sourcing
[debug:/usr/bin/wslview] first run or update_time not present; calling var_gen
[debug:/usr/bin/wslview] var_gen: called
[debug:/usr/bin/wslview] baseexec_gen: called
[debug:/usr/bin/wslview] baseexec_gen: winbuild: 19045
[debug:/usr/bin/wslview] baseexec_gen: 19H1 or higher
[debug:/usr/bin/wslview] baseexec_gen: imported distro
[debug:/usr/bin/wslview] distro: gentoo
[debug:/usr/bin/wslview] lname: .
[debug:/usr/bin/wslview] WSLVIEW_DEFAULT_ENGINE: powershell
[debug:/usr/bin/wslview] Received linux relative path
[debug:/usr/bin/wslview] properfile_full_path: /home/pascal
[debug:/usr/bin/wslview] validating whether if it is a link
[debug:/usr/bin/wslview] It is not a link
[debug:/usr/bin/wslview] cmd: "\lxss\home\pascal"
[debug:/usr/bin/wslview] winps_exec: called with command Start "\lxss\home\pascal"
Start : This command cannot be run due to the error: The system cannot find the file
specified.
At line:1 char:128
+ ... = [System.Text.Encoding]::GetEncoding(850); Start "\lxss\home\pascal"
+                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationExcepti
   on
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartP
   rocessCommand

Steps to Reproduce

  1. Install wslu
  2. type wslview . in WSL-Terminal

Expected behavior

wslu opens an explorer window with the current directory

Additional context

wslview "https://www.github.com" works. wslpath . also resolves the path to /lxss/...

Code of Conduct

Schievel1 commented 6 months ago

This is because I had https://github.com/laurent22/wslpath installed. So this was called instead of MS' wslpath. I deleted wslpath in /usr/bin and it works now.