Skip to content

ExecutorFactory

Category: Shell

Source: executor_factory.dart

Classes

ExecutorFactory

Methods

`static Future<CommandExecutor> create({
required ShellConfig shellConfig,
required DockerConfig dockerConfig,
required String cwd,
List&lt;MountEntry&gt; sessionMounts = const [],
bool? dockerAvailable,
RuntimeEventSink? eventSink,

})`

Creates the appropriate [CommandExecutor] for the current config.

When Docker is enabled, checks that the docker binary is available and returns a [DockerExecutor]. If Docker isn't installed and [DockerConfig.fallbackToHost] is true, falls back to [HostExecutor].

Throws [StateError] if Docker is required (no fallback) but not found.

Released under the MIT License.