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

Code not found in path error when VSCode is installed through Snap on Linux #38

Open
golf1052 opened this issue Jan 3, 2020 · 1 comment

Comments

@golf1052
Copy link
Owner

@golf1052 golf1052 commented Jan 3, 2020

Created this to track Linux Snap issues separately from #9

Some background first. CodeSync uses the code CLI to install extensions. To call the CLI CodeSync uses child_process.execSync(). When VSCode installed through Snap any calls to the CLI get swallowed resulting in an empty string returned by execSync. Some other people have reported similar issues for other Snap packages while using NodeJS exec

See
microsoft/vscode#75581
nodesource/distributions#663
https://bugs.launchpad.net/snapd/+bug/1835805
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753

There seems to be a workaround suggested in the last issue linked

If /snap/node/current/bin/node is expected to work better, then maybe it’s reasonable to ask why /snap/bin/node goes through /usr/bin/snap at all for a classic snap? Could snap just set it up as a direct symlink to /snap/node/current/bin/node and avoid this problem?

Doing some preliminary testing shows that this workaround works. I'll push a new version shortly with this fix.

@golf1052

This comment has been minimized.

Copy link
Owner Author

@golf1052 golf1052 commented Jan 4, 2020

I've released 2.6.2 which should fix this issue. Please report back if you're still seeing problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.