Skip to content

Atom installation is not recognized #2735

Closed

Description

@polyrainbow

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%

Activity

  1. added
    bug
    on Sep 14, 2017
  2. self-assigned this
    on Sep 14, 2017
  3. shiftkey commented on Sep 14, 2017

    @shiftkey
    Member

    @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.

  4. j-f1 commented on Sep 14, 2017

    @j-f1
    Contributor

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

  5. charles-passille-smartnets commented on Sep 15, 2017

    @charles-passille-smartnets

    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

  6. charles-passille-smartnets commented on Sep 15, 2017

    @charles-passille-smartnets

    @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 :)

  7. locked as resolved and limited conversation to collaborators on Jul 20, 2018
  8. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions