special sponsors

lando.shell.get() ⇒ Array

Gets running processes.

Kind: global function
Returns: Array - An array of the currently running processes
Since: 3.0.0

lando.shell.sh(cmd, [opts]) ⇒ Promise

Runs a command.

This is an abstraction method that:

  1. Delegates to either node's native spawn or exec methods.
  2. Promisifies the calling of these function
  3. Handles stdout, stdin and stderr

Kind: global function
Returns: Promise - A promise with collected results if applicable.

Since: 3.0.0

Param Type Default Description
cmd Array The command to run as elements in an array.
[opts] Object Options to help determine how the exec is run.
[opts.mode] Boolean 'exec' The mode to run in
[opts.detached] Boolean false Whether we are running in detached mode or not (deprecated)
[opts.cwd] Boolean process.cwd() The directory to run the command from


// Run a command in collect mode
return lando.shell.sh(['ls', '-lsa', '/'], {mode: 'collect'})

// Catch and log any errors
.catch(err => {

// Print the collected results of the command
.then(results => {

lando.shell.which(cmd) ⇒ String | null

Returns the path of a specific command or binary.

Kind: global function
Returns: String | null - The path to the command or null.
Since: 3.0.0

Param Type Description
cmd String A command to search for.


// Determine the location of the 'docker' command
const which = lando.shell.which(DOCKER_EXECUTABLE);