File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -520,7 +520,7 @@ class Cache {
520
520
if (_hasWarnedAboutStorageOverride) {
521
521
return ;
522
522
}
523
- _logger.printStatus (
523
+ _logger.printError (
524
524
'Flutter assets will be downloaded from $overrideUrl . Make sure you trust this source!' ,
525
525
emphasis: true ,
526
526
);
Original file line number Diff line number Diff line change @@ -319,6 +319,22 @@ void main() {
319
319
320
320
expect (() => cache.storageBaseUrl, throwsToolExit ());
321
321
});
322
+
323
+ testWithoutContext ('overridden storage base url prints warning to STDERR' , () async {
324
+ final BufferLogger logger = BufferLogger .test ();
325
+ const String baseUrl = 'https://storage.com' ;
326
+ final Cache cache = Cache .test (
327
+ platform: FakePlatform (environment: < String , String > {
328
+ 'FLUTTER_STORAGE_BASE_URL' : baseUrl,
329
+ }),
330
+ processManager: FakeProcessManager .any (),
331
+ logger: logger,
332
+ );
333
+
334
+ expect (cache.storageBaseUrl, baseUrl);
335
+ expect (logger.errorText, contains ('Flutter assets will be downloaded from $baseUrl ' ));
336
+ expect (logger.statusText, isEmpty);
337
+ });
322
338
});
323
339
324
340
testWithoutContext ('flattenNameSubdirs' , () {
You can’t perform that action at this time.
0 commit comments