From 03d50d1f8a36466bf6af6c0843502e04ee42daf5 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 19 Jun 2023 11:18:16 -0700 Subject: [PATCH] Fix an ordering dependency in the flutter_tools upgrade test (#129131) Cache.flutterRoot is set within testUsingContext and will be uninitialized the first time test suite setup is invoked. --- .../test/commands.shard/permeable/upgrade_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart b/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart index cb32e9ea25..cc1c8bc566 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart @@ -38,7 +38,7 @@ void main() { setUp(() { fakeCommandRunner = FakeUpgradeCommandRunner(); realCommandRunner = UpgradeCommandRunner() - ..workingDirectory = Cache.flutterRoot; + ..workingDirectory = getFlutterRoot(); processManager = FakeProcessManager.empty(); fakeCommandRunner.willHaveUncommittedChanges = false; fakePlatform = FakePlatform()..environment = Map.unmodifiable({