run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
Future run() async {
if (argResults!.rest.isEmpty) {
print('Must provide a path');
return false;
}
var path = argResults!.rest.first;
await GitRepository.init(path);
var quiet = argResults!['quiet'] as bool;
if (quiet) {
return;
}
var dotGitDir = p.join(p.canonicalize(path), '.git') + p.separator;
print('Initialized empty Git repository in $dotGitDir');
}