diff --git a/src/commands/pull.js b/src/commands/pull.js index 8d60a2cc..320679f1 100644 --- a/src/commands/pull.js +++ b/src/commands/pull.js @@ -10,7 +10,7 @@ module.exports = { { name: 'exit', boolean: false, - help: 'exit after specified number of seconds (gives the dat network time to find updates). defaults to 12 seconds.' + help: 'exit after specified number of seconds, to give the dat network time to find updates. (default: 12)' }, { @@ -66,8 +66,10 @@ function pull (opts) { opts.createIfMissing = false // If --exit is specified without a number of seconds, default to 12 - if (opts.exit === true) { - opts.exit = 12 + if (opts.exit) { + opts.exit = typeof opts.exit === 'number' + ? opts.exit + : 12 } var neat = neatLog(archiveUI, { logspeed: opts.logspeed, quiet: opts.quiet, debug: opts.debug }) diff --git a/src/ui/components/download.js b/src/ui/components/download.js index dfe8130d..d7c8f78d 100644 --- a/src/ui/components/download.js +++ b/src/ui/components/download.js @@ -26,7 +26,7 @@ function networkUI (state) { } } - if (state.opts.exit) { + if (typeof state.opts.exit === 'number') { title = `dat synced, exiting in ${state.opts.exit} seconds.` }