andy-5 / wslgit

Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
MIT License
1.19k stars 59 forks source link

invalid option error with WSL1 #111

Open xiaok opened 4 years ago

xiaok commented 4 years ago

I installed newest wslgit release and add it to PATH.

wsl1: Ubuntu 18.04LTS git version in wsl1 : git version 2.17.1

image

wslgit /bin/bash: - : invalid option

andy-5 commented 4 years ago

Did you make any changes to .bashrc or similar startup scripts? Or do you use a different shell like zsh or fish in WSL?

As a quick test to debug this, you could try to run something like the following

wsl -e bash -c "git version"

and see if that works. This command is basically what wslgit runs internally.