ScriptSpec class

Script execution specification.

Resolution order:

  1. If scriptPath exists under the working directory (or is absolute), execute it.
  2. Otherwise execute scriptString if provided and non-empty.
  3. Otherwise execute defaultScriptString.

Constructors

ScriptSpec({String shell = 'bash', String? scriptPath, String? scriptString, String defaultScriptString = "echo 'Hello'", List<String> shellArgs = const []})

Properties

defaultScriptString String
Fallback inline script content when both scriptPath and scriptString are unavailable.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scriptPath String?
Script file path. Only executed if the file exists.
final
scriptString String?
Inline script content used when scriptPath is missing or does not exist.
final
shell String
Shell executable used to run the script (defaults to bash).
final
shellArgs List<String>
Additional shell arguments (e.g. ['-lc']).
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