genie icon indicating copy to clipboard operation
genie copied to clipboard

Command 'code' not found

Open lopugit opened this issue 4 years ago • 1 comments

Windows version (build number): Find this by running winver

Version 21H1 19043.1348

Linux distribution: i.e. Debian bullseye, Ubuntu focal, etc. If your distro was not installed from the Microsoft Store, please indicate source and method of installation.

Ubuntu Focal

Genie version: The output of genie --version

1.44

Describe the bug A clear and concise description of what the bug is.

When I enter genie shell via genie -s, and try to run the code command, the WSL vscode version, I get the error Command 'code' not found

This is only when inside the genie shell, when I'm outside, code command works fine

Confirm that you are running inside the bottle: The output of genie -b.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

code should be in PATH ?

Screenshots If applicable, add screenshots to help explain your problem.

e7c972b428e2b873aecdfff1db1b5a72

Additional context Add any other context about the problem here.

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:

  • [x] Yes.

lopugit avatar Nov 27 '21 01:11 lopugit

It seems that the PATH environment is not transmitted well.

I wrote the following at the top of the .zshrc:

if [[ -v INSIDE_GENIE ]]; then
   source <(systemctl show-environment | awk '{print "export "$0}')
fi

Of course, note that this method also has a problem of importing unnecessary environment variables.

(See also, https://github.com/arkane-systems/genie/wiki/No-Windows-interop-when-connecting-to-WSL-genie-via-ssh https://github.com/arkane-systems/genie/wiki/Command-%22code%22-not-found-for-VScode-remote-in-bottle%3F-Here%27s-a-solution ).

letrhee avatar Jan 13 '22 06:01 letrhee