feature/clean-a-specific-scheme: Add this-scheme new flag for clean command (#116733)
Co-authored-by: Enguerrand_ARMINJON_MAC_2 <earminjon@sqli.com>
This commit is contained in:
committed by
GitHub
parent
902d86e09c
commit
6259b690f6
@@ -4,6 +4,7 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:args/command_runner.dart';
|
||||
import 'package:file/memory.dart';
|
||||
import 'package:flutter_tools/src/base/common.dart';
|
||||
import 'package:flutter_tools/src/base/context.dart';
|
||||
@@ -103,6 +104,18 @@ Matcher throwsToolExit({ int? exitCode, Pattern? message }) {
|
||||
/// Matcher for [ToolExit]s.
|
||||
final TypeMatcher<ToolExit> _isToolExit = isA<ToolExit>();
|
||||
|
||||
/// Matcher for functions that throw [UsageException].
|
||||
Matcher throwsUsageException({Pattern? message }) {
|
||||
Matcher matcher = _isUsageException;
|
||||
if (message != null) {
|
||||
matcher = allOf(matcher, (UsageException e) => e.message.contains(message));
|
||||
}
|
||||
return throwsA(matcher);
|
||||
}
|
||||
|
||||
/// Matcher for [UsageException]s.
|
||||
final TypeMatcher<UsageException> _isUsageException = isA<UsageException>();
|
||||
|
||||
/// Matcher for functions that throw [ProcessException].
|
||||
Matcher throwsProcessException({ Pattern? message }) {
|
||||
Matcher matcher = _isProcessException;
|
||||
|
||||
Reference in New Issue
Block a user