Index: sdk/lib/_internal/pub/lib/src/utils.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart |
index f5727a46eeff0127eed9ad2d35b11fa6a458ceb3..719b29efbdc767ae27a2b532c6dffd7bc8325cf0 100644 |
--- a/sdk/lib/_internal/pub/lib/src/utils.dart |
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart |
@@ -687,9 +687,9 @@ String prefixLines(String text, {String prefix: '| ', String firstPrefix}) { |
return lines.join('\n'); |
} |
-/// Whether pub is running as a subprocess in an integration test. |
-bool get runningAsTest => |
- Platform.environment.containsKey('_PUB_TESTING'); |
+/// Whether pub is running as a subprocess in an integration test or in a unit |
+/// test that has explicitly set this. |
+bool runningAsTest = Platform.environment.containsKey('_PUB_TESTING'); |
/// Wraps [fn] to guard against several different kinds of stack overflow |
/// exceptions: |