-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Steps to reproduce
- Install VS Code on macOS with a case-sensitive file system. (You don’t need to reinstall macOS—creating an APFS volume with a case-sensitive option is sufficient. See Apple Support for instructions.)
- Run
flutter doctorin the terminal.
Expected results
flutter doctor correctly detects and returns the VS Code version.
Actual results
flutter doctor fails to determine the VS Code version, displaying the following output:
$ flutter doctor
...
[✓] VS Code (version unknown)
✗ Unable to determine VS Code version.
Code sample
Screenshots or Video
Logs
Flutter Doctor output
Since the issue is evident from the output above, attaching a full log is unnecessary.
Tested on:
- Flutter stable (3.29.0)
- Flutter main (3.30.0-1.0.pre.190)
Additional Information:
By default, macOS uses a case-insensitive file system, so this issue does not occur in standard setups. However, users who create a case-sensitive APFS volume may run into this problem. The problem arises because flutter doctor looks for the VS Code version in /Applications/Visual Studio Code.app/Contents/resources/app/package.json, whereas the correct path is /Applications/Visual Studio Code.app/Contents/Resources/app/package.json (note the capitalization difference).
To verify the correct directory structure, run:
$ ls -1 /Applications/Visual\ Studio\ Code.app/Contents/
Expected output (showing Resources instead of resources):
$ ls -1 /Applications/Visual\ Studio\ Code.app/Contents/
CodeResources
Frameworks
Info.plist
MacOS
PkgInfo
Resources
_CodeSignature
Since this is a simple fix (updating the path reference in the source code), I will submit a PR soon.