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

Fixed checkForSnapUpdate in updateService.linux.ts to correctly identify snap version #63716

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

Kedstar99
Copy link
Contributor

This issue stems from the following discussion where it appears that the snap build of vscode by snapcrafters was throwing warnings for being outdated.

snapcrafters/vscode#29

Credit to @meddario as he was able to identify exactly the failing function.

The main issue in this case is that product.applicationName is looking for the name 'code', whilst the SNAP is mounted under the name 'vscode'.

Using https://github.com/snapcore/snapd/wiki/Environment-Variables

It seems that the environment variable SNAP is useful for identifying the mount point for the snap.

I have tested the backtick and functionality of the new code under a node shell.

snap connect --run vscode

The code executed as expected.

@Kedstar99 Kedstar99 changed the title Fixed checkForSnapUpdate in updateService.linux.ts to use environment… Fixed checkForSnapUpdate in updateService.linux.ts to correctly identify snap version Nov 25, 2018
@joaomoreno joaomoreno modified the milestones: Backlog, November 2018 Nov 26, 2018
@joaomoreno joaomoreno added the linux Issues with VS Code on Linux label Nov 26, 2018
@joaomoreno
Copy link
Member

Note that you have a potential null pointer:

2018-11-24T16:14:30.3157044Z src/vs/platform/update/electron-main/updateService.linux.ts(85,28): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
2018-11-24T16:14:30.3157264Z   Type 'undefined' is not assignable to type 'string'.
2018-11-24T16:14:30.4144912Z error Command failed with exit code 1.

@Kedstar99
Copy link
Contributor Author

Kedstar99 commented Nov 26, 2018

Fixed

@joaomoreno joaomoreno merged commit 3953262 into microsoft:master Nov 28, 2018
@joaomoreno
Copy link
Member

Thanks! 🍻

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linux Issues with VS Code on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants