Command<dynamic> -> Command<int> (#2709)

diff --git a/lib/pub.dart b/lib/pub.dart
index 02078bf..a7c2bf2 100644
--- a/lib/pub.dart
+++ b/lib/pub.dart
@@ -5,4 +5,4 @@
 
 /// Returns a [Command] for pub functionality that can be used by an embedding
 /// CommandRunner.
-Command pubCommand() => PubEmbeddableCommand();
+Command<int> pubCommand() => PubEmbeddableCommand();
diff --git a/lib/src/command.dart b/lib/src/command.dart
index 0d59e28..47f4f05 100644
--- a/lib/src/command.dart
+++ b/lib/src/command.dart
@@ -42,7 +42,7 @@
 /// A command may either be a "leaf" command or it may be a parent for a set
 /// of subcommands. Only leaf commands are ever actually invoked. If a command
 /// has subcommands, then one of those must always be chosen.
-abstract class PubCommand extends Command<dynamic> {
+abstract class PubCommand extends Command<int> {
   SystemCache get cache => _cache ??= SystemCache(isOffline: isOffline);
 
   SystemCache _cache;
diff --git a/lib/src/command_runner.dart b/lib/src/command_runner.dart
index f36d5b4..0e14700 100644
--- a/lib/src/command_runner.dart
+++ b/lib/src/command_runner.dart
@@ -35,7 +35,7 @@
 import 'log.dart';
 import 'sdk.dart';
 
-class PubCommandRunner extends CommandRunner implements PubTopLevel {
+class PubCommandRunner extends CommandRunner<int> implements PubTopLevel {
   @override
   bool get captureStackChains {
     return _argResults['trace'] ||
diff --git a/tool/test-bin/pub_command_runner.dart b/tool/test-bin/pub_command_runner.dart
index cf49bd6..056f105 100644
--- a/tool/test-bin/pub_command_runner.dart
+++ b/tool/test-bin/pub_command_runner.dart
@@ -6,7 +6,7 @@
 import 'package:pub/src/log.dart' as log;
 import 'package:pub/src/exit_codes.dart' as exit_codes;
 
-class Runner extends CommandRunner {
+class Runner extends CommandRunner<int> {
   ArgResults _options;
 
   Runner() : super('pub_command_runner', 'Tests the embeddable pub command.') {