mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
Do not check the executable status of gen_snapshot if it has not yet been downloaded (#52574)
This commit is contained in:
parent
601c8dbebb
commit
bbc9d4f3a6
|
@ -640,7 +640,8 @@ class FlutterValidator extends DoctorValidator {
|
|||
globals.artifacts.getArtifactPath(Artifact.genSnapshot);
|
||||
|
||||
// Check that the binaries we downloaded for this platform actually run on it.
|
||||
if (!_genSnapshotRuns(genSnapshotPath)) {
|
||||
if (globals.fs.file(genSnapshotPath).existsSync()
|
||||
&& !_genSnapshotRuns(genSnapshotPath)) {
|
||||
final StringBuffer buf = StringBuffer();
|
||||
buf.writeln(userMessages.flutterBinariesDoNotRun);
|
||||
if (globals.platform.isLinux) {
|
||||
|
|
|
@ -529,6 +529,16 @@ void main() {
|
|||
Platform: _kNoColorOutputPlatform,
|
||||
});
|
||||
|
||||
testUsingContext('gen_snapshot binary not available', () async {
|
||||
expect(await FlutterValidatorDoctor().diagnose(verbose: false), isTrue);
|
||||
// gen_snapshot is downloaded on demand, and the doctor should not
|
||||
// fail if the gen_snapshot binary is not present.
|
||||
expect(testLogger.statusText, contains('No issues found!'));
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('version checking does not work', () async {
|
||||
final VersionCheckError versionCheckError = VersionCheckError('version error');
|
||||
|
||||
|
|
Loading…
Reference in a new issue