Created
September 16, 2016 10:12
-
-
Save andywer/cbaca0ebb1a8d5e72279e3bfb09019fa to your computer and use it in GitHub Desktop.
Listr Verbose Renderer Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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