Bob command execution module.
Handles execution of individual and series commands with output capture.
Methods
(inner) exec(command:, opts:, cb:)
Execute a single command and capture its output.
Parameters:
| Name | Type | Description |
|---|---|---|
command: |
String
|
the command to execute |
opts: |
Object
|
- cwd: base directory where the commands should be executed from - quiet: don't display command output if quiet - task: Bob task name, used to create output directory - type: Bob task type name, used to create output directory - dir: report directory where process output will be written into a file |
cb: |
function
|
standard cb(err, result) callback |
(inner) execSeries(commands:, opts:, cb:)
Execute multiple commands in series.
Parameters:
| Name | Type | Description |
|---|---|---|
commands: |
Array
|
an array of commands, each command contains: - exec: executable command line, to be executed on shell - meta: command metadata, task and type |
opts: |
Object
|
- cwd: base directory where the commands should be executed from - tmp: temporary directory where the command output will be written - quiet: don't display command output if quiet |
cb: |
function
|
standard cb(err, result) callback |