Move host build check until it's actually used. (#11926)
* Move host build check until it's actually used * Elaborate diagnostic message
This commit is contained in:
parent
7ee0b6a574
commit
59bc0a0fce
@ -5,6 +5,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter_tools/src/base/common.dart';
|
||||||
import 'package:flutter_tools/src/base/process_manager.dart';
|
import 'package:flutter_tools/src/base/process_manager.dart';
|
||||||
import 'package:usage/uuid/uuid.dart';
|
import 'package:usage/uuid/uuid.dart';
|
||||||
|
|
||||||
@ -18,6 +19,11 @@ String _dartExecutable() {
|
|||||||
final String engineDartSdkPath = artifacts.getArtifactPath(
|
final String engineDartSdkPath = artifacts.getArtifactPath(
|
||||||
Artifact.engineDartSdkPath
|
Artifact.engineDartSdkPath
|
||||||
);
|
);
|
||||||
|
if (!fs.isDirectorySync(engineDartSdkPath)) {
|
||||||
|
throwToolExit('No dart sdk Flutter host engine build found at $engineDartSdkPath.\n'
|
||||||
|
'Note that corresponding host engine build is required even when targeting particular device platforms.',
|
||||||
|
exitCode: 2);
|
||||||
|
}
|
||||||
return fs.path.join(engineDartSdkPath, 'bin', 'dart');
|
return fs.path.join(engineDartSdkPath, 'bin', 'dart');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,9 +336,6 @@ class FlutterCommandRunner extends CommandRunner<Null> {
|
|||||||
|
|
||||||
final String hostLocalEngine = 'host_' + localEngine.substring(localEngine.indexOf('_') + 1);
|
final String hostLocalEngine = 'host_' + localEngine.substring(localEngine.indexOf('_') + 1);
|
||||||
final String engineHostBuildPath = fs.path.normalize(fs.path.join(enginePath, 'out', hostLocalEngine));
|
final String engineHostBuildPath = fs.path.normalize(fs.path.join(enginePath, 'out', hostLocalEngine));
|
||||||
if (!fs.isDirectorySync(engineHostBuildPath)) {
|
|
||||||
throwToolExit('No Flutter host engine build found at $engineHostBuildPath.', exitCode: 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new EngineBuildPaths(targetEngine: engineBuildPath, hostEngine: engineHostBuildPath);
|
return new EngineBuildPaths(targetEngine: engineBuildPath, hostEngine: engineHostBuildPath);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user