blob: f8abb42109f0f6c36c7647d2024828e97180cd39 [file] [log] [blame]
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
import 'package:args/src/arg_results.dart';
import 'package:nnbd_migration/migration_cli.dart';
main(List<String> args) async {
var cli = MigrationCli(binaryName: 'nnbd_migration');
ArgResults argResults;
try {
argResults = MigrationCli.createParser().parse(args);
} on FormatException catch (e) {
cli.handleArgParsingException(e);
}
if (cli.exitCode == null) await cli.run(argResults);
exit(cli.exitCode ?? 0);
}