git ssb

4+

Dominic / scuttlebot



Commit 1e50b700e5a159d12d2bcd376af3c4b0a80c8000

show a progress bar, but only if stdout is a TTY

Dominic Tarr committed on 6/9/2017, 11:32:59 PM
Parent: 5580e6a2549e71500ea6cc7af3b4c5b5f21684fa

Files changed

bin.jschanged
bin.jsView
@@ -11,8 +11,9 @@
1111 var createHash = require('multiblob/util').createHash
1212 var minimist = require('minimist')
1313 var muxrpcli = require('muxrpcli')
1414 var cmdAliases = require('./lib/cli-cmd-aliases')
15+var ProgressBar = require('./lib/progress')
1516
1617 //get config as cli options after --, options before that are
1718 //options to the command.
1819 var argv = process.argv.slice(2)
@@ -47,9 +48,8 @@
4748 .use(require('./plugins/private'))
4849 .use(require('ssb-query'))
4950 .use(require('ssb-links'))
5051 .use(require('ssb-ws'))
51-// .use(require('ssb-ebt'))
5252
5353 // add third-party plugins
5454 require('./plugins/plugins').loadUserPlugins(createSbot, config)
5555
@@ -59,8 +59,11 @@
5959 var server = createSbot(config)
6060
6161 // write RPC manifest to ~/.ssb/manifest.json
6262 fs.writeFileSync(manifestFile, JSON.stringify(server.getManifest(), null, 2))
63+
64+ if(process.stdout.isTTY)
65+ ProgressBar(server.progress)
6366 } else {
6467
6568 // normal command:
6669 // create a client connection to the server
@@ -146,7 +149,4 @@
146149 })
147150 }
148151
149152
150-
151-
152-

Built with git-ssb-web