Skip to content

Fail to start from WSL #4998

Closed
Closed

Description

@minonl

Description

In a WSL(Windows Subsystem for Linux) exclusively available on Windows 10, running github CLI command fail to start Github Desktop.

Version

  • GitHub Desktop:
    Version 1.2.3
  • Operating system:
    Microsoft Windows [Version 10.0.17134.112]
    WSL enabled with Ubuntu 18.04

Steps to Reproduce

  1. Install WSL on a Windows 10 system by following Microsoft's Guide, Ubuntu 18.04 is installed for example.
  2. Install Github Desktop.
  3. Start bash, wsl from Start Menu, or start from your installed Linux distro app ubuntu
  4. Run github and you can observe the error message

Expected Behavior

By running github in WSL should the application start as expected as it does in cmd, PowerShell and Git bash on Windows 10.

Actual Behavior

The application won't start and a script error is printed.

sh: 0: Can't open /mnt/d/bob/AppData/Local/GitHubDesktop/bin/..\app-1.2.3\resources\app\static\github.sh

Additional Information

As @shiftkey suggested, this script which do start the application properly in Git Bash, cmd and PowerShell on Windows 10, should be modified to cover WSL.

If it is caused by unexpected behavior from WSL, we might need to check WSL Github.

Since WSL keeps adding more Linux distro, they should be considered as well.

And regarding to #4641, WSL will be added to supported shell options, so this issue should be fixed by then so Github Desktop can start and be started from WSL.

Activity

  1. minonl commented on Jun 22, 2018

    @minonl
    Author

    I've some time to look into this 😃

    1. Since the script error says:
    min@MMM:/mnt/d/joe5y$ github
    sh: 0: Can't open /mnt/d/joe5y/AppData/Local/GitHubDesktop/bin/..\app-1.2.3\resources\app\static\github.sh
    

    And the real path to `github.sh is:

    min@MMM:/mnt/d/joe5y$ sh '/mnt/d/joe5y/AppData/Local/GitHubDesktop/app-1.2.3/resources/app/static/github.sh'
    

    which successfully start the app, so actually earlier /mnt/d/joe5y/AppData/Local/GitHubDesktop/bin/github which compose the path here

    #!/usr/bin/env bash
      DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
      sh "$DIR/..\app-1.2.3\resources\app\static\github.sh" "$@"
    

    that offered a wrong folder path(echo $DIR):

    min@MMM:/mnt/d/joe5y/AppData/Local/GitHubDesktop/bin$ github
    /mnt/d/joe5y/AppData/Local/GitHubDesktop/bin
    sh: 0: Can't open /mnt/d/joe5y/AppData/Local/GitHubDesktop/bin/..\app-1.2.3\resources\app\static\github.sh
    
    1. Also WSL doesn't understand the file path
    min@MMM:/mnt/d/joe5y$ sh '/mnt/d/joe5y/AppData/Local/GitHubDesktop/..\app-1.2.3\resources\app\static\github.sh'
    sh: 0: Can't open /mnt/d/joe5y/AppData/Local/GitHubDesktop/..\app-1.2.3\resources\app\static\github.sh
    

    @shiftkey If I
    m right, the code to generate /mnt/d/joe5y/AppData/Local/GitHubDesktop/bin/github need minor update.

  2. shiftkey commented on Jun 22, 2018

    @shiftkey
    Member

    @minvedacat probably - I had a look at the VSCode script and it seems to do some WSL-specific checks. We should do the same.

  3. added
    bug
    help wanted
    on Jun 22, 2018
  4. removed
    help wanted
    on Jul 20, 2018
  5. self-assigned this
    on Jul 20, 2018
  6. removed their assignment
    on Aug 27, 2018
  7. added
    help wanted
    on Aug 27, 2018
  8. shiftkey commented on Aug 27, 2018

    @shiftkey
    Member

    Switching this back to help-wanted because I don't have the bandwidth currently to do this - you can see what I did in #5111 which I think was on the right track, if someone with WSL experience wants to help wrap it up.

  9. added
    priority-3
    on Oct 11, 2018
  10. shawnfunke commented on Jan 2, 2020

    @shawnfunke
    Contributor

    I will take a look at this

  11. added a commit that references this issue on Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wantedpriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions