Create when offline style (#101589)

This commit is contained in:
Jesús S Guerrero 2022-04-11 14:14:05 -05:00 committed by GitHub
parent 63a6e9005d
commit 2302daa3aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -1301,11 +1301,10 @@ abstract class FlutterCommand extends Command<void> {
if (shouldUpdateCache) { if (shouldUpdateCache) {
// First always update universal artifacts, as some of these (e.g. // First always update universal artifacts, as some of these (e.g.
// ios-deploy on macOS) are required to determine `requiredArtifacts`. // ios-deploy on macOS) are required to determine `requiredArtifacts`.
bool offline; final bool offline;
if (argParser.options.containsKey('offline')) { if (argParser.options.containsKey('offline')) {
offline = boolArg('offline'); offline = boolArg('offline');
} } else {
else {
offline = false; offline = false;
} }
await globals.cache.updateAll(<DevelopmentArtifact>{DevelopmentArtifact.universal}, offline: offline); await globals.cache.updateAll(<DevelopmentArtifact>{DevelopmentArtifact.universal}, offline: offline);

View File

@ -40,10 +40,9 @@ class FakePub extends Fake implements Pub {
bool printProgress = true, bool printProgress = true,
}) async { }) async {
fs.directory(directory).childFile('.packages').createSync(); fs.directory(directory).childFile('.packages').createSync();
if (offline == true){ if (offline == true) {
calledGetOffline += 1; calledGetOffline += 1;
} } else {
else {
calledOnline += 1; calledOnline += 1;
} }
} }