run method
Runs this command.
The return value is wrapped in a Future if necessary and returned by
CommandRunner.runCommand.
Implementation
@override
void run() async {
try {
ProgressReporter.reportPhase('Preparing dependency upgrade');
final config = _prepareConfiguration();
if (config['upgradeAll']) {
await _upgradeAllDependencies(config);
} else {
await _upgradeSpecificPackage(config);
}
_reportSuccess();
} catch (e) {
ErrorHandler.handleException(
ProjectCommandError.dependencyFailure,
e,
'Dependency upgrade failed',
);
}
}