File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ var mkdirp = require ( 'mkdirp' ) ;
12
23Blockchain = function ( blockchainConfig ) {
34 this . config = blockchainConfig ;
@@ -73,6 +74,14 @@ Blockchain.prototype.get_address = function() {
7374 var address = null ;
7475
7576 if ( config . account . init ) {
77+ // ensure datadir exists, bypassing the interactive liabilities prompt.
78+ var newDir = mkdirp . sync ( config . datadir ) ;
79+ if ( newDir ) {
80+ console . log ( "=== datadir created" ) ;
81+ } else {
82+ console . log ( "=== datadir already exists" ) ;
83+ }
84+
7685 console . log ( "running: " + this . list_command ( ) ) ;
7786 result = exec ( this . list_command ( ) ) ;
7887
@@ -96,4 +105,3 @@ Blockchain.prototype.startChain = function(use_tmp) {
96105}
97106
98107module . exports = Blockchain
99-
Original file line number Diff line number Diff line change 1919 "jasmine" : " ^2.3.1" ,
2020 "meteor-build-client" : " ^0.1.6" ,
2121 "methodmissing" : " ^0.0.3" ,
22+ "mkdirp" : " ^0.5.1" ,
2223 "python" : " ^0.0.4" ,
2324 "read-yaml" : " ^1.0.0" ,
2425 "shelljs" : " ^0.5.0" ,
You can’t perform that action at this time.
0 commit comments