I have been using Flutter in Visual Studio Code.
It prompted me to flutter upgrade
, and I did.
Now flutter doctor
gives
Unhandled exception:
Invalid argument(s): Cannot find executable for git.
#0 _getExecutable (package:process/src/interface/local_process_manager.dart:127:5)
#1 LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:94:30)
#2 _DefaultProcessUtils.runSync (package:flutter_tools/src/base/process.dart:417:51)
#3 _runGit (package:flutter_tools/src/version.dart:665:23)
#4 new FlutterVersion (package:flutter_tools/src/version.dart:54:26)
#5 runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:138:29)
...
despite git being in the path (last item [Update] no change when I moved it to the start & restarted VSC):
C:\Users\me>path
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
[snip]
e:\coding\flutter\bin\mingit\cmd;
The path is 1,876 chars long - is that still a problem in Windows 10?
and accessible:
C:\Users\me>git
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
IMPORTANT: this is happening even after a total, clean, uninstall of VSC, using Revo Uninstaller Pro and reinstall.
[Update] I have added the path to flutter.bat
to my path
and can invoke flutter
from the cmd
command line. I could not find any flutter.exe
.
Visual Studio Code still says that it does not recognize the command flutter