ProcessRunner class
Execute shell commands with retry logic
Constructors
- ProcessRunner({int maxAutoRetries = 2, bool showVerbose = false})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxAutoRetries → int
-
Maximum automatic retries before prompting user
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showVerbose → bool
-
Whether to show verbose output
final
Methods
-
commandExists(
String command) → Future< bool> - Check if a command exists on the system
-
getCommandVersion(
String command, {List< String> versionArgs = const <String>['--version']}) → Future<String?> - Get the version of a command
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
String executable, List< String> arguments, {String? workingDirectory, Map<String, String> ? environment, bool inheritStdio = false}) → Future<ProcessResult> - Run a command and return the result
-
runStreaming(
String executable, List< String> arguments, {String? workingDirectory, Map<String, String> ? environment}) → Future<int> - Run a command and stream output in real-time
-
runWithRetry(
String executable, List< String> arguments, {String? workingDirectory, Map<String, String> ? environment, String? operationName, bool interactive = true}) → Future<ProcessResult?> - Run a command with automatic retry on failure Returns null if user chooses to skip Throws AbortException if user chooses to abort
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited