Skip to content
Snippets Groups Projects
Commit d6855962 authored by Natalie Weizenbaum's avatar Natalie Weizenbaum
Browse files

Ignore the DART_SDK variable in pub.

Now that Platform.resolvedExecutable exists, the environment variable
only provided a way to load files from the wrong SDK.

Closes #1288

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1220553002.
parent 68308887
No related branches found
No related tags found
No related merge requests found
......@@ -20,12 +20,9 @@ import 'io.dart';
final String rootDirectory = (() {
if (runningFromDartRepo) return p.join(dartRepoRoot, 'sdk');
var dartSdk = Platform.environment["DART_SDK"];
if (dartSdk != null) return dartSdk;
// The Dart exectuable is in "/path/to/sdk/bin/dart", so two levels up is
// "/path/to/sdk".
var aboveExecutable = p.dirname(p.dirname(Platform.executable));
var aboveExecutable = p.dirname(p.dirname(Platform.resolvedExecutable));
assert(fileExists(p.join(aboveExecutable, 'version')));
return aboveExecutable;
})();
......
......@@ -36,4 +36,4 @@ dev_dependencies:
unittest: "^0.11.0"
environment:
sdk: ">=1.11.0-dev.3.0 <2.0.0"
sdk: ">=1.11.0 <2.0.0"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment