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

Atom installation is not recognized #2735

Closed
SebastianZimmer opened this Issue Sep 14, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@SebastianZimmer

SebastianZimmer commented Sep 14, 2017

Description

I have installed 0.8.2 today and was wondering why GitHub Desktop did not recognize my Atom installation. After a bit of research I found out that getActiveCodePage() ( https://github.com/desktop/desktop/blob/master/app/src/lib/shell.ts#L179 ) fails. I think it's because of this regex:

const chcpOutputRegex = /^Active code page: (\d{1,}).*/
https://github.com/desktop/desktop/blob/master/app/src/lib/shell.ts#L170

On my system, where the display language is "German", the chcp command does return Aktive Codepage: 850.

Version

GitHub Desktop version: 0.8.2

OS version: Microsoft Windows [Version 10.0.15063]

Steps to Reproduce

  1. Install Atom and Github Desktop on Windows with German display language
  2. Click in Desktop on "Open in external editor"

Expected behavior: Atom should open

Actual behavior: Atom ist not found by GitHub Desktop

Reproduces how often: 100%

@shiftkey shiftkey added the bug label Sep 14, 2017

@shiftkey shiftkey self-assigned this Sep 14, 2017

@shiftkey

This comment has been minimized.

Member

shiftkey commented Sep 14, 2017

@SebastianZimmer thanks for the report, and the additional detective work!

On my system, where the display language is "German", the chcp command does return Aktive Codepage: 850.

I think I might have to make this regex more relaxed and just scan for the number.

@j-f1

This comment has been minimized.

Member

j-f1 commented Sep 14, 2017

/\d+/$ should work for most[citation needed] cases.

@charles-passille-smartnets

This comment has been minimized.

charles-passille-smartnets commented Sep 15, 2017

Same problem on Japanese Win10.

@j-f1 it's not about the regex itself, it's that it's searching for Active code page but a computer with a different system language returns something different, such as Aktive Codepage or '���݂̃R�[�h �y�[�W: 932

@charles-passille-smartnets

This comment has been minimized.

charles-passille-smartnets commented Sep 15, 2017

@SebastianZimmer
@shiftkey

I have a hotfix if you just want to use it, it's not a real solution though.

On Line 220 just change resolve(null) to resolve(850) (in your case for german)
It was 932 for me, etc. It will bypass the regex and just assign your system's language path.

Enjoy :)

@lock lock bot locked as resolved and limited conversation to collaborators Jul 20, 2018

@desktop desktop unlocked this conversation Sep 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment