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 extension not working if the VSCode folder was called "Code - OSS" #179

Merged
merged 2 commits into from
Apr 23, 2018
Merged

Conversation

Kurolox
Copy link
Contributor

@Kurolox Kurolox commented Apr 23, 2018

Basically added an extra if statement when checking the value of vscode.env.appName, so if it has "OSS" on it, the path will be changed to Code - OSS instead of Code, which was conflicting before making the extension unable to work.

@alefragnani
Copy link
Owner

Hi @Kurolox ,

Thanks for you PR. I will merge and update the extension later today.

@alefragnani alefragnani added bug OSS VS Code version built from source labels Apr 23, 2018
src/extension.ts Outdated
@@ -594,6 +594,8 @@ export function activate(context: vscode.ExtensionContext) {
function getChannelPath(): string {
if (vscode.env.appName.indexOf("Insiders") > 0) {
return "Code - Insiders";
} else if (vscode.env.appName.indexOf("OSS") > 0) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make a small change. Instead of another if statement, it would be better to use:

    function getChannelPath(): string {
      return vscode.env.appName.replace("Visual Studio ", "");
    }

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry if you can't update the PR right now. I can do it myself before merging. I was just playing with code-review 😀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, I'll update it right now. I've never touched TypeScript, so I didn't want to take any chances and went with something simple that I knew it would work. This is better, though.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great. Btw, my first TypeScript experience was also with VS Code extensions 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement OSS VS Code version built from source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants