diff --git a/packages/flutter_tools/lib/src/commands/packages.dart b/packages/flutter_tools/lib/src/commands/packages.dart index 510e9bf2a0c..cbcdd61b317 100644 --- a/packages/flutter_tools/lib/src/commands/packages.dart +++ b/packages/flutter_tools/lib/src/commands/packages.dart @@ -237,7 +237,7 @@ class PackagesForwardCommand extends FlutterCommand { @override Future runCommand() async { Cache.releaseLockEarly(); - await pub([_commandName, ...argResults.rest], context: PubContext.pubForward, retry: false); + await pubInteractively([_commandName, ...argResults.rest]); return null; } diff --git a/packages/flutter_tools/test/general.shard/commands/packages_test.dart b/packages/flutter_tools/test/general.shard/commands/packages_test.dart index e92e9a756d0..426bc615099 100644 --- a/packages/flutter_tools/test/general.shard/commands/packages_test.dart +++ b/packages/flutter_tools/test/general.shard/commands/packages_test.dart @@ -396,10 +396,9 @@ void main() { testUsingContext('deps', () async { await createTestCommandRunner(PackagesCommand()).run(['packages', 'deps']); final List commands = mockProcessManager.commands; - expect(commands, hasLength(3)); + expect(commands, hasLength(2)); expect(commands[0], matches(r'dart-sdk[\\/]bin[\\/]pub')); - expect(commands[1], '--trace'); - expect(commands[2], 'deps'); + expect(commands[1], 'deps'); }, overrides: { ProcessManager: () => mockProcessManager, Stdio: () => mockStdio, @@ -409,10 +408,9 @@ void main() { testUsingContext('cache', () async { await createTestCommandRunner(PackagesCommand()).run(['packages', 'cache']); final List commands = mockProcessManager.commands; - expect(commands, hasLength(3)); + expect(commands, hasLength(2)); expect(commands[0], matches(r'dart-sdk[\\/]bin[\\/]pub')); - expect(commands[1], '--trace'); - expect(commands[2], 'cache'); + expect(commands[1], 'cache'); }, overrides: { ProcessManager: () => mockProcessManager, Stdio: () => mockStdio, @@ -422,10 +420,9 @@ void main() { testUsingContext('version', () async { await createTestCommandRunner(PackagesCommand()).run(['packages', 'version']); final List commands = mockProcessManager.commands; - expect(commands, hasLength(3)); + expect(commands, hasLength(2)); expect(commands[0], matches(r'dart-sdk[\\/]bin[\\/]pub')); - expect(commands[1], '--trace'); - expect(commands[2], 'version'); + expect(commands[1], 'version'); }, overrides: { ProcessManager: () => mockProcessManager, Stdio: () => mockStdio, @@ -435,10 +432,9 @@ void main() { testUsingContext('uploader', () async { await createTestCommandRunner(PackagesCommand()).run(['packages', 'uploader']); final List commands = mockProcessManager.commands; - expect(commands, hasLength(3)); + expect(commands, hasLength(2)); expect(commands[0], matches(r'dart-sdk[\\/]bin[\\/]pub')); - expect(commands[1], '--trace'); - expect(commands[2], 'uploader'); + expect(commands[1], 'uploader'); }, overrides: { ProcessManager: () => mockProcessManager, Stdio: () => mockStdio, @@ -448,11 +444,10 @@ void main() { testUsingContext('global', () async { await createTestCommandRunner(PackagesCommand()).run(['packages', 'global', 'list']); final List commands = mockProcessManager.commands; - expect(commands, hasLength(4)); + expect(commands, hasLength(3)); expect(commands[0], matches(r'dart-sdk[\\/]bin[\\/]pub')); - expect(commands[1], '--trace'); - expect(commands[2], 'global'); - expect(commands[3], 'list'); + expect(commands[1], 'global'); + expect(commands[2], 'list'); }, overrides: { ProcessManager: () => mockProcessManager, Stdio: () => mockStdio,