runUpgrade function
void
runUpgrade()
执行CLI升级
Implementation
void runUpgrade() async {
final result = await runExecutableArguments('dart', ['pub', 'global', 'activate', 'yuro_cli'], verbose: true);
if (result.exitCode == 0) {
logger.i('\nyuro_cli has been updated to the latest version.');
logger.i('Process finished with exit code ${result.exitCode}\n');
} else {
logger.e('\nError: ${result.stderr}');
logger.e('Process finished with exit code ${result.exitCode}\n');
}
}