Skip to content

Instantly share code, notes, and snippets.

@andywer
Created September 16, 2016 10:12
Show Gist options
  • Save andywer/cbaca0ebb1a8d5e72279e3bfb09019fa to your computer and use it in GitHub Desktop.
Save andywer/cbaca0ebb1a8d5e72279e3bfb09019fa to your computer and use it in GitHub Desktop.
Listr Verbose Renderer Issue
const execa = require('execa')
const Listr = require('listr')
const rootListr = createListr([
{
title: 'root',
task: () => createListr([
{
title: 'sleep 1s',
task: () => execa.shell('echo "Sleeping 1s" && sleep 1 && echo "Done sleeping"')
},
{
title: 'sleep 2s',
task: () => execa.shell('sleep 2')
}
])
}
])
rootListr.run().catch((error) => {
console.error(error)
})
function createListr (tasks) {
return new Listr(tasks, { renderer: 'verbose' })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment