Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 8d0af36

Browse files
authored
πŸ₯… Produce warning instead of error for storage base url overrides (#119595)
* πŸ₯… Only log warning for storage base url * βœ… Add test * βœ… Add the link to the test * βœ… Remove the test * βœ… Remove the extra import
1 parent 6f9a896 commit 8d0af36

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

β€Žpackages/flutter_tools/lib/src/cache.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ class Cache {
520520
if (_hasWarnedAboutStorageOverride) {
521521
return;
522522
}
523-
_logger.printError(
523+
_logger.printWarning(
524524
'Flutter assets will be downloaded from $overrideUrl. Make sure you trust this source!',
525525
emphasis: true,
526526
);

β€Žpackages/flutter_tools/test/general.shard/cache_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void main() {
319319
expect(() => cache.storageBaseUrl, throwsToolExit());
320320
});
321321

322-
testWithoutContext('overridden storage base url prints warning to STDERR', () async {
322+
testWithoutContext('overridden storage base url prints warning', () async {
323323
final BufferLogger logger = BufferLogger.test();
324324
const String baseUrl = 'https://storage.com';
325325
final Cache cache = Cache.test(
@@ -331,7 +331,7 @@ void main() {
331331
);
332332

333333
expect(cache.storageBaseUrl, baseUrl);
334-
expect(logger.errorText, contains('Flutter assets will be downloaded from $baseUrl'));
334+
expect(logger.warningText, contains('Flutter assets will be downloaded from $baseUrl'));
335335
expect(logger.statusText, isEmpty);
336336
});
337337
});

0 commit comments

Comments
Β (0)