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

genie -c fails with paths containing spaces #240

Closed
1 task done
notpeelz opened this issue Mar 7, 2022 · 1 comment
Closed
1 task done

genie -c fails with paths containing spaces #240

notpeelz opened this issue Mar 7, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@notpeelz
Copy link

notpeelz commented Mar 7, 2022

Windows version (build number):
Windows 10 Pro 21H2 (OS Build 19044.1526)

Linux distribution:
Debian unstable (sid)

Genie version:
genie --version: 2.0
apt-cache show systemd-genie: 2.2

Describe the bug
After applying the patch mentioned here, the VS Code server fails to launch:
image

In the screenshot above, you can see runinwsl failing to locate /mnt/c/Users/peelz/AppData/Local/Programs/Microsoft VS Code (cut off at the first space)

I managed to fix the issue by changing this line:

--- a/binsrc/genie/__main__.py
+++ b/binsrc/genie/__main__.py
@@ -660,7 +660,7 @@ def do_command(commandline):
     command = ["machinectl", "shell", "-q", login + "@.host", "/usr/lib/genie/runinwsl", os.getcwd()] + commandline

     with nsenter.Namespace (sdp, 'pid'):
-        sp = subprocess.run (' '.join(command), shell=True)
+        sp = subprocess.run (command)
         return sp

Extra information
The command array contains this:

['machinectl', 'shell', '-q', 'peelz@.host', '/usr/lib/genie/runinwsl', '/mnt/c/Users/peelz/AppData/Local/Programs/Microsoft VS Code', '/mnt/c/Users/peelz/.vscode/extensions/ms-vscode-remote.remote-wsl-0.64.2/scripts/wslServer.sh', 'b5205cc8eb4fbaa726835538cd82372cc0222d43', 'stable', 'code-server', '.vscode-server', '--host=127.0.0.1', '--port=0', '--connection-token=3502240250-2084421065', '--use-host-proxy', '--without-browser-env-var', '--disable-websocket-compression', '--accept-server-license-terms']

I confirm that I have read the ENTIRE supplied readme file and checked for relevant information on the repository wiki before raising this issue, and that if the solution to this issue is found in either location, it will be closed without further comment:

  • Yes.
@notpeelz notpeelz added the bug Something isn't working label Mar 7, 2022
cerebrate added a commit that referenced this issue Mar 7, 2022
@cerebrate
Copy link
Member

Fixed in 2.3. Thanks for the catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants