Repository navigation
WSL CLI Fix [#4998] - #8863
WSL CLI Fix [#4998]#8863
Conversation
|
@shiftkey Any news on this? |
|
@shawnfunke I'm no longer working on GitHub Desktop. Providing more context about what the fix is and how to verify the fix locally could help with getting someone to work on it. |
|
I've looked at the worked you've started and pretty much just finished it. I've tested this with Git Bash, Debian WSL, CMD and PowerShell on my local machine. |
|
@shawnfunke would you mind rebasing this PR on the upstream |
|
@dennisameling sure, i'll rebase and test this :) |
|
@dennisameling I've rebased my by branch but after trying for hours I'm not able to test it. I'm always getting the error below when trying to build the project, are you able to test it? It could be because I'm not running the latest stable Windows 10 release. |
|
@shawnfunke I can't seem to build desktop with Maybe it's related to the error you're seeing? Maybe better to rebase based on the latest release version (https://github.com/desktop/desktop/releases/tag/release-2.4.0) which is from 20 days ago. This version was updated to Electron 7 so the major dependency upgrade is done in it. You should be able to rebase based on a certain tag (release-2.4.0): https://stackoverflow.com/a/12469904/4337765 |
|
@dennisameling not sure, it's weird that the CI builds were successful. I will try to rebase it with the tag tomorrow and try that instead. |
|
@dennisameling ensure you have done a |
|
Got it to work now, had to completely remove |
dennisameling
left a comment
There was a problem hiding this comment.
✔️ launches successfully on Windows cmd
✔️ launches successfully in Windows WSL2 command line (Ubuntu)
✔️ launches successfully in Git Bash on Windows
Thanks so far for this PR!! 😄
| "$ELECTRON" "$@" | ||
| exit $? | ||
| fi | ||
| elif [ "$(expr substr $(uname -s) 1 9)" == "CYGWIN_NT" ]; then |
There was a problem hiding this comment.
Could you please change == to = as it causes the following message in WSL2 (Ubuntu):
dennis@DESKTOP-HIGHLVU:/mnt/c/Users/denni$ github
/mnt/c/Users/denni/AppData/Local/GitHubDesktop/bin/../app-2.4.1-beta1/resources/app/static/github.sh: 20: [: Linux: unexpected operator
When I changed it to = as per these instructions, I didn't get the warning anymore.
dennisameling
left a comment
There was a problem hiding this comment.
Works as expected. Thanks @shawnfunke!!
✔️ launches successfully on Windows cmd
✔️ launches successfully in Windows WSL2 command line (Ubuntu)
✔️ launches successfully in Git Bash on Windows
|
@dennisameling Hey, is this supposed to be already merged or are we waiting for a specific release to drop? |
|
@shawnfunke I'm not a member of the GitHub Desktop repository 😊 The only thing I can do is to help test PRs so that it's easier for the core team to verify and merge them. Let's hope they will merge this fix soon! |
|
@dennisameling Ah, okay thanks for the insight :) |
niik
left a comment
There was a problem hiding this comment.
Hey @shawnfunke, thanks so much for working on this! I'm terribly sorry it's taken so long for us to do a review of this. We're working through a long backlog of community contributions and unfortunately none of us are experts at WSL.
A huge thanks to @dennisameling for testing this PR and ushering it along ❤️ We really appreciate it.
I've added some requests for changes in the PR but I wanted to make sure I understood the problem fully. I took a look at the github.sh trampoline file that's currently on my Windows VM and it looked something like this
If I've understood things what we want is for it to use a POSIX path instead, something like this
Is that correct?
|
@niik , yes you understood it correctly. Thanks for your review, I agree with your suggestions and I will go ahead and add them to this PR! |
These suggestions shorten and simplify the code Co-authored-by: Markus Olsson <[email protected]>
niik
left a comment
There was a problem hiding this comment.
Great work @shawnfunke and @dennisameling. I verified the fix with a test release and confirmed that the bin/github trampoline path only used forward slashes
I wasn't able to verify this in WSL since I don't have that available but given that the original fix was verified in WSL by @dennisameling and that the subsequent changes were only cleanup that didn't affect the logic I'm happy to merge this.



Closes #4998
Description
This PR fixes issue #4998
Release notes
Notes:
githubcommand from the WSL CLI