For anyone still getting such error:
Github Desktop lets you choose which shell to use for the git operations. Try setting a different shell one via:
File -> Option -> Integrations -> Shell
Thanks d-kleine on Github for the suggestion.