hub: Commands randomly fail on Windows under WSL
When I run hub clone styled-components/vscode-styled-components, it simply does not do anything, doesn’t clone the repo, neither emits any message to the console. I don’t know why, because it doesn’t throw any errors, logs or anything, it just doesn’t do anything.
If I try to clone a repo using the syntax hub clone REPO, without the USER, it clones fine. Same if I use the whole URL hub clone https://github.com/styled-components/vscode-styled-components.git.
Weird thing, if I clone using the URL, and then clone using the USER/REPO syntax (hub clone styled-components/vscode-styled-components), it says fatal: destination path 'vscode-styled-components' already exists and is not an empty directory., so I imagine that when I reproduce the bug, hub is trying to do something, but failing silently
Any ideas why this is happening? Or where I can look for clues (logs or anything)?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 15 (6 by maintainers)
@mislav - I modified
cmd.golike the followingand received
My info
I have the same “random” symptom as well. When it works, the memory allocation error doesn’t occur
It also seems memory allocation errors are common in WSL, though I can’t seem to find a workaround. I’ll keep searching.
Edit
I added some memory output code to prove plenty of free memory existed
then modified the exec call again to the following
which resulted in the output
Edit 2
I found a workaround which is to always run the
cmd.Spawneven when in linux. e.g.I use hub for very minimal purposes so this is fine for me.
If you want me to further debug then please let me know.