ShellExecOptions class final

Options for Shell.exec.

Constructors

ShellExecOptions({String? cwd, Map<String, String>? env, Duration? timeout, CancelToken? cancelToken, void onStdout(String chunk)?, void onStderr(String chunk)?, String? stdinData, LiveStdinChannel? liveStdin, int? jobLogMaxBytes, void onJobLogWarning(String chunk)?})
Creates ShellExecOptions.
const

Properties

cancelToken → CancelToken?
Token used to terminate the command early.
final
cwd → String?
Working directory for the command. Defaults to FileSystem.cwd.
final
env → Map<String, String>?
Additional environment variables; values override the defaults.
final
hashCode → int
The hash code for this object.
no setterinherited
jobLogMaxBytes → int?
Size ceiling for a detached job's log in bytes (issue #919). Only honored by BackgroundShell.startShellJob; null means the shell's default (defaultJobLogMaxBytes). Foreground execs ignore it.
final
liveStdin → LiveStdinChannel?
Optional live stdin write channel (issue #367). When attached, the implementation binds the channel to the spawned process's stdin and keeps the pipe open for the process's lifetime — a password ask that arrives mid-run can be answered through LiveStdinChannel.write. Null keeps the old behavior: stdin closes right after start.
final
onJobLogWarning → void Function(String chunk)?
Fired at most once per detached job when the low-disk guard stops log writes (issue #919). Only honored by BackgroundShell.startShellJob; foreground execs ignore it.
final
onStderr → void Function(String chunk)?
Called with stderr chunks as they are produced.
final
onStdout → void Function(String chunk)?
Called with stdout chunks as they are produced.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stdinData → String?
Optional data written to the command's stdin before the pipe closes (a password/passphrase answer, a y\n confirmation). Null keeps the old behavior: stdin closes immediately.
final
timeout → Duration?
Timeout for the command. Implementations should return a ExecutionErrorCode.timeout error when exceeded.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited