Update cli_util.dart
diff --git a/lib/cli_util.dart b/lib/cli_util.dart
index aff2c67..6533e9f 100644
--- a/lib/cli_util.dart
+++ b/lib/cli_util.dart
@@ -33,7 +33,14 @@
}
// Look relative to the dart executable.
- Directory sdkDirectory = new File(Platform.executable).parent.parent;
+ File platformExecutable = new File(Platform.executable);
+ Directory sdkDirectory = platformExecutable.parent.parent;
+ if (_isSdkDir(sdkDirectory)) return sdkDirectory;
+
+ // Handle the case where Platform.executable is a sibling of the SDK directory
+ // (this happens during internal testing).
+ sdkDirectory =
+ new Directory(p.join(platformExecutable.parent.path, 'dart-sdk'));
if (_isSdkDir(sdkDirectory)) return sdkDirectory;
// Try and locate the VM using 'which'.