Move all null safety packages' min dart sdk to 2.12.0 (#3822)

This commit is contained in:
Chris Yang
2021-04-23 10:19:03 -07:00
committed by GitHub
parent c4170d8f64
commit 3c57df37c0
2 changed files with 36 additions and 3 deletions

View File

@ -18,7 +18,17 @@ class PublishCheckCommand extends PluginCommand {
Directory packagesDir,
FileSystem fileSystem, {
ProcessRunner processRunner = const ProcessRunner(),
}) : super(packagesDir, fileSystem, processRunner: processRunner);
}) : super(packagesDir, fileSystem, processRunner: processRunner) {
argParser.addFlag(
_allowPrereleaseFlag,
help: 'Allows the pre-release SDK warning to pass.\n'
'When enabled, a pub warning, which asks to publish the package as a pre-release version when '
'the SDK constraint is a pre-release version, is ignored.',
defaultsTo: false,
);
}
static const String _allowPrereleaseFlag = 'allow-pre-release';
@override
final String name = 'publish-check';
@ -98,6 +108,10 @@ class PublishCheckCommand extends PluginCommand {
return true;
}
if (!(argResults[_allowPrereleaseFlag] as bool)) {
return false;
}
await stdOutCompleter.future;
await stdInCompleter.future;