Unverified Commit 589dd802 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[flutter_tools] print override storage warning to STDERR instead of STDOUT (#106068)

parent 261246b8
......@@ -520,7 +520,7 @@ class Cache {
if (_hasWarnedAboutStorageOverride) {
return;
}
_logger.printStatus(
_logger.printError(
'Flutter assets will be downloaded from $overrideUrl. Make sure you trust this source!',
emphasis: true,
);
......
......@@ -319,6 +319,22 @@ void main() {
expect(() => cache.storageBaseUrl, throwsToolExit());
});
testWithoutContext('overridden storage base url prints warning to STDERR', () async {
final BufferLogger logger = BufferLogger.test();
const String baseUrl = 'https://storage.com';
final Cache cache = Cache.test(
platform: FakePlatform(environment: <String, String>{
'FLUTTER_STORAGE_BASE_URL': baseUrl,
}),
processManager: FakeProcessManager.any(),
logger: logger,
);
expect(cache.storageBaseUrl, baseUrl);
expect(logger.errorText, contains('Flutter assets will be downloaded from $baseUrl'));
expect(logger.statusText, isEmpty);
});
});
testWithoutContext('flattenNameSubdirs', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment