Index: pkg/analysis_server/lib/src/server/driver.dart |
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart |
index 6228efbd5cdc4e350e265b2c5cab8454c4f08db5..73867fe81d364a26cf9bec76315dc75da65191f0 100644 |
--- a/pkg/analysis_server/lib/src/server/driver.dart |
+++ b/pkg/analysis_server/lib/src/server/driver.dart |
@@ -399,12 +399,16 @@ class Driver implements ServerStarter { |
// Use DirectoryBasedDartSdk.defaultSdkDirectory, which will make a guess. |
defaultSdkDirectory = DirectoryBasedDartSdk.defaultSdkDirectory; |
} |
- SdkCreator defaultSdkCreator = |
- () => new DirectoryBasedDartSdk(defaultSdkDirectory); |
+ SdkCreator defaultSdkCreator = (AnalysisOptions options) { |
+ DirectoryBasedDartSdk sdk = |
+ new DirectoryBasedDartSdk(defaultSdkDirectory); |
+ sdk.analysisOptions = options; |
+ return sdk; |
+ }; |
// TODO(brianwilkerson) It would be nice to avoid creating an SDK that |
// cannot be re-used, but the SDK is needed to create a package map provider |
// in the case where we need to run `pub` in order to get the package map. |
- DirectoryBasedDartSdk defaultSdk = defaultSdkCreator(); |
+ DirectoryBasedDartSdk defaultSdk = defaultSdkCreator(null); |
// |
// Initialize the instrumentation service. |
// |