mirror of
https://github.com/flutter/packages.git
synced 2025-08-06 17:28:42 +08:00
Move all null safety packages' min dart sdk to 2.12.0 (#3822)
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user