shell_run library

Classes

Shell
Multiplatform Shell utility to run a script with multiple commands. [...]

Properties

platformEnvironment Map<String, String>
Environment without debug VM_OPTIONS and without any user overrides [...]
read-only
shellEnvironment Map<String, String>
Cached shell environment with user config Same as userEnvironment
@protected, read / write
userAppDataPath String
Returns the user data path [...]
read-only
userEnvironment Map<String, String>
Get the user environment [...]
read-only
userHomePath String
Return the user home path. [...]
read-only
userPaths List<String>
Get the list of user paths used to resolve binaries location. [...]
read-only

Functions

run(String script, {bool throwOnError = true, String workingDirectory, Map<String, String> environment, bool includeParentEnvironment = true, bool runInShell, Encoding stdoutEncoding = systemEncoding, Encoding stderrEncoding = systemEncoding, Stream<List<int>> stdin, StreamSink<List<int>> stdout, StreamSink<List<int>> stderr, bool verbose = true, bool commandVerbose, bool commentVerbose}) Future<List<ProcessResult>>
Run one or multiple plain text command(s). [...]
shellArgument(String argument) String
Use to safely enclose an argument if needed
userLoadEnv({Map<String, String> vars, List<String> paths}) → void
Only specify the vars to override and the paths to add
userLoadEnvFile(String path) → void
Update userPaths and userEnvironment

Exceptions / Errors

ShellException
Exception thrown in exitCode != 0 and throwOnError is true