Index: pkg/analyzer/lib/src/dart/sdk/sdk.dart |
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart |
index 7ab8272011ce21a18e8ded28635029be9e4f8fb7..2e71aebc2c7c352c1011972a25938026af09da84 100644 |
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart |
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart |
@@ -680,6 +680,14 @@ class FolderBasedDartSdk extends AbstractDartSdk { |
return null; |
} |
pathos.Context pathContext = resourceProvider.pathContext; |
+ if (pathContext != pathos.context) { |
+ // The only time this will be true is if pathContext == posix and |
+ // pathos.context == windows, which only happens when running tests. |
+ if (exec.startsWith(new RegExp('[a-zA-Z]:'))) { |
+ exec = exec.substring(2); |
+ } |
+ exec = pathContext.fromUri(pathos.context.toUri(exec)); |
+ } |
// Might be "xcodebuild/ReleaseIA32/dart" with "sdk" sibling |
String outDir = pathContext.dirname(pathContext.dirname(exec)); |
String sdkPath = pathContext.join(pathContext.dirname(outDir), "sdk"); |