[flutter_tool] Some additional input validation for 'version' (#39136)
This commit is contained in:
@@ -65,6 +65,10 @@ class VersionCommand extends FlutterCommand {
|
||||
|
||||
// check min supported version
|
||||
final Version targetVersion = Version.parse(version);
|
||||
if (targetVersion == null) {
|
||||
throwToolExit('Failed to parse version "$version"');
|
||||
}
|
||||
|
||||
bool withForce = false;
|
||||
if (targetVersion < minSupportedVersion) {
|
||||
if (!argResults['force']) {
|
||||
|
||||
Reference in New Issue
Block a user