mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
run pub get (w/ symlinks) for flutter drive (#4259)
* run pub get (w/ symlinks) for flutter drive * review comments
This commit is contained in:
parent
d6147fd7fa
commit
111392d7c9
@ -12,8 +12,11 @@ import '../android/android_device.dart' show AndroidDevice;
|
||||
import '../application_package.dart';
|
||||
import '../base/file_system.dart';
|
||||
import '../base/common.dart';
|
||||
import '../base/logger.dart';
|
||||
import '../base/os.dart';
|
||||
import '../base/process.dart';
|
||||
import '../build_info.dart';
|
||||
import '../dart/sdk.dart';
|
||||
import '../device.dart';
|
||||
import '../globals.dart';
|
||||
import '../ios/simulators.dart' show SimControl, IOSSimulatorUtils;
|
||||
@ -121,6 +124,16 @@ class DriveCommand extends RunCommandBase {
|
||||
printStatus('Will connect to already running application instance.');
|
||||
}
|
||||
|
||||
// Check for the existance of a `packages/` directory; pub test does not yet
|
||||
// support running without symlinks.
|
||||
if (!new io.Directory('packages').existsSync()) {
|
||||
Status status = logger.startProgress(
|
||||
'Missing packages directory; running `pub get` (to work around https://github.com/dart-lang/test/issues/327):'
|
||||
);
|
||||
await runAsync(<String>[sdkBinaryName('pub'), 'get', '--no-precompile']);
|
||||
status.stop(showElapsedTime: true);
|
||||
}
|
||||
|
||||
try {
|
||||
return await testRunner(<String>[testFile])
|
||||
.catchError((dynamic error, dynamic stackTrace) {
|
||||
|
Loading…
Reference in New Issue
Block a user