SmfEnvironment class abstract interface

What a hook with side effects may use: the machine, the user, and external commands.

PreflightChecks and the choose hooks of roles receive it. The pipeline implements it, and tests pass fakes, so hooks never touch dart:io directly.

Properties

hashCode → int
The hash code for this object.
no setterinherited
interactive → bool
Whether the user can answer prompts: there is a terminal and the run is not --no-input.
no setter
logger → SmfLogger
Reports progress and problems.
no setter
operatingSystem → HostOperatingSystem
The operating system the pipeline runs on.
no setter
processRunner → SmfProcessRunner
Runs external commands.
no setter
prompter → SmfPrompter
Asks the user; use only when interactive.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skipExternalSetup → bool
Whether the run skips setup outside the app, such as installing tools or logging in (--skip-external-setup); hooks print instructions instead.
no setter

Methods

environmentVariable(String name) → String?
The value of the environment variable name of the process that runs the pipeline, or null if it is not set.
findExecutable(String name) → Future<String?>
Returns the absolute path of the executable name on the PATH, or null if it is not found.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
writeTempFile(String name, String contents) → Future<String>
Writes contents to a new temporary file whose name ends with name, such as an install script, and returns its absolute path.

Operators

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