Options
All
  • Public
  • Public/Protected
  • All
Menu

Options to set the behavior of this base task.

Type parameters

Hierarchy

  • ListrOptions

Index

Properties

collectErrors?: false | "minimal" | "full"

Collects errors to ListrInstance.errors

This can take up a lot of memory, so disabling it can fix out-of-memory errors

  • 'full' will clone the current context and task in to the error instance
  • 'minimal' will only collect the error message and the location
  • false will collect no errors
default

'minimal'

concurrent?: number | boolean

Concurrency sets how many tasks will be run at the same time in parallel.

default

false > Default is to run everything synchronously.

true will set it to Infinity, false will set it to synchronous.

If you pass in a number it will limit it to that number.

ctx?: Ctx

To inject a context through this options wrapper. Context can also be defined in run time.

default

{}

disableColor?: boolean

Disabling the color, useful for tests and such.

default

false

exitAfterRollback?: boolean

Determine the behavior of exiting after rollback actions.

This is independent of exitOnError, since failure of a rollback can be a more critical operation comparing to failing a single task.

default

true > exit after rolling back tasks

exitOnError?: boolean

Determine the default behavior of exiting on errors.

default

true > exit on any error coming from the tasks.

injectWrapper?: { enquirer?: Enquirer<object> }

Inject data directly to TaskWrapper.

Type declaration

registerSignalListeners?: boolean

By default, Listr2 will track SIGINIT signal to update the renderer one last time before completely failing.

default

true

rendererFallback?: boolean | (() => boolean)

Determine the certain condition required to use the non-TTY renderer.

default

null > handled internally

rendererSilent?: boolean | (() => boolean)

Determine the certain condition required to use the silent renderer.

default

null > handled internally