Index: lib/src/io.dart |
diff --git a/lib/src/io.dart b/lib/src/io.dart |
index 944e0a5a8c995f9ae15e2499569954ce37a7f0e6..7a45b115c01bc3a15e6075bde3ee6f532fdc22a9 100644 |
--- a/lib/src/io.dart |
+++ b/lib/src/io.dart |
@@ -486,7 +486,7 @@ final bool runningAsTest = |
/// |
/// This works because when running from tests, pub always uses a snapshot named |
/// "pub.test.snapshot", which is not used outside of tests. |
Bob Nystrom
2015/06/26 16:41:16
Update the doc comment.
nweiz
2015/06/26 19:49:10
Done.
|
-final bool runningFromTest = Platform.script.path.endsWith('.test.snapshot'); |
+final bool runningFromTest = Platform.environment.containsKey('_PUB_TESTING'); |
/// Whether pub is running from within the Dart SDK, as opposed to from the Dart |
/// source repository. |