I am trying to get M-x shell to work with "Bash on Ubuntu on Windows" (
https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/)
I have tried
(setq explicit-shell-file-name "C:/Windows/System32/bash.exe")
(setq shell-file-name explicit-shell-file-name)
but when I type "M-x shell" I get the error
"Spawning child process: invalid argument"
If instead I use cygwin
(setq explicit-shell-file-name "C:/cygwin64/bin/bash.exe")
everything works fine
Note: If I run a windows cmd.exe window and type "C:\Windows\System32\bash" then it runs correctly