(folders: string[])
| 632 | } |
| 633 | |
| 634 | private findFlutterSdk(folders: string[]): SdkSearchResults { |
| 635 | return this.searchPaths( |
| 636 | folders, |
| 637 | executableNames.flutter, |
| 638 | // Also check for some additional files so we won't detect `/usr/bin/flutter` as a Flutter SDK at `/usr`. |
| 639 | (p) => this.containsFile(p, flutterPath) && ( |
| 640 | this.containsFile(p, "analysis_options.yaml") |
| 641 | || this.containsFile(p, "bin/flutter.bat") // Exists on non-Windows clones of Git and is an obvious sign of the SDK. |
| 642 | || this.containsFile(p, "bin/internal/engine.version") |
| 643 | ), |
| 644 | ); |
| 645 | } |
| 646 | |
| 647 | private containsFile(folder: string, filePath: string): boolean { |
| 648 | const fullPath = path.join(folder, filePath); |
no test coverage detected