ProcessShellBackend class
A ShellBackend that runs commands and interactive shells as OS processes.
- exec runs the request through a shell (
<shell> -c "<command>") so a full command line works, unless explicit ShellRequest.args are provided, in which case the program is executed directly. - shell launches an interactive login shell.
The default shell is resolved from $SHELL (POSIX) or cmd.exe (Windows),
overridable via defaultShell. An optional allowCommand predicate can veto
commands for least-privilege deployments.
- Implemented types
Constructors
Properties
- allowCommand → bool Function(ShellRequest request)?
-
Optional guard; when provided and it returns
false, the session is refused (the runtime reportsnode.session.rejected).final -
baseEnvironment
→ Map<
String, String> -
Extra environment overlaid on the inherited environment for every session.
final
-
baseEnvironmentFor
→ Map<
String, String> Function(Map<String, String> inherited)? -
When set, supplies the extra environment per session instead of
baseEnvironment, given the environment the session inherits (e.g. a
LiveNodeProfile, so profile edits apply without a restart).final - defaultShell → String
-
The shell used for exec mode and as the default interactive shell.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- workingDirectory → String?
-
Optional working directory applied when a request does not specify one.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
ShellRequest request) → Future< ShellSession> -
Starts a session for
request, returning a live ShellSession.override -
startWithNodeEnvironment(
ShellRequest request, Map< String, String> nodeEnvironment) → Future<ShellSession> - start, given the node side of the session's environment — the live environment with the profile over it — already computed (by a decorating backend falling back to this one), so it is not read a second time.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited