Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(898)

Unified Diff: pkg/analyzer-experimental/lib/src/generated/java_io.dart

Issue 12809003: Look for dart-sdk in two places. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer-experimental/lib/src/generated/java_io.dart
diff --git a/pkg/analyzer-experimental/lib/src/generated/java_io.dart b/pkg/analyzer-experimental/lib/src/generated/java_io.dart
index 40e6f2d81bbc3f58821fec8e9189dd755f99a753..53c25466be328dd454b752c549e3195208a1f858 100644
--- a/pkg/analyzer-experimental/lib/src/generated/java_io.dart
+++ b/pkg/analyzer-experimental/lib/src/generated/java_io.dart
@@ -24,7 +24,17 @@ class JavaSystemIO {
if (name == 'com.google.dart.sdk') {
String exec = new Options().executable;
if (exec.length != 0) {
- String sdkPath = new Path(exec).directoryPath.directoryPath.toString();
+ String sdkPath;
+ // may be "xcodebuild/ReleaseIA32/dart" with "dart-sdk" sibling
+ {
+ sdkPath = new Path(exec).directoryPath.append("dart-sdk").toNativePath();
+ if (new Directory(sdkPath).existsSync()) {
+ _properties[name] = sdkPath;
+ return sdkPath;
+ }
+ }
+ // probably be "dart-sdk/bin/dart"
+ sdkPath = new Path(exec).directoryPath.directoryPath.toString();
_properties[name] = sdkPath;
return sdkPath;
}

Powered by Google App Engine
This is Rietveld 408576698