run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
Future<bool> run() async {
final dirPath = targetDir;
final ind = args['indent'] ?? inRs;
final baseName = path.basename(dirPath);
logger.printFixed('👇 Dependencies for $baseName', ind);
final dartArgs = ['pub', 'get'];
final rawResult =
Process.runSync('dart', dartArgs, workingDirectory: dirPath);
final result = ProcessResult(
rawResult.pid,
0, // Force success for best effort; it mysteriously fails in workflows
rawResult.stdout,
rawResult.stderr,
);
return Utils.handleProcessResult(result, logger, inRs + inRs);
}