remove execSync
This commit is contained in:
parent
843f60b7d7
commit
2fb91557db
|
@ -13,7 +13,6 @@
|
||||||
"embark-framework": "^0.0.1",
|
"embark-framework": "^0.0.1",
|
||||||
"commander": "^2.8.1",
|
"commander": "^2.8.1",
|
||||||
"compression": "^1.4.3",
|
"compression": "^1.4.3",
|
||||||
"execSync": "^1.0.2",
|
|
||||||
"express": "^4.12.3",
|
"express": "^4.12.3",
|
||||||
"grunt-contrib-clean": "^0.6.0",
|
"grunt-contrib-clean": "^0.6.0",
|
||||||
"grunt-contrib-coffee": "^0.13.0",
|
"grunt-contrib-coffee": "^0.13.0",
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "^2.8.1",
|
"commander": "^2.8.1",
|
||||||
"compression": "^1.4.3",
|
"compression": "^1.4.3",
|
||||||
"execSync": "^1.0.2",
|
|
||||||
"express": "^4.12.3",
|
"express": "^4.12.3",
|
||||||
"grunt": "^0.4.5",
|
"grunt": "^0.4.5",
|
||||||
"grunt-cli": "^0.1.13",
|
"grunt-cli": "^0.1.13",
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
module.exports = (grunt) ->
|
module.exports = (grunt) ->
|
||||||
readYaml = require('read-yaml')
|
readYaml = require('read-yaml')
|
||||||
require('shelljs/global')
|
require('shelljs/global')
|
||||||
sh = require('execSync')
|
|
||||||
|
|
||||||
grunt.registerTask "blockchain", "deploy ethereum node", (env_) =>
|
grunt.registerTask "blockchain", "deploy ethereum node", (env_) =>
|
||||||
env = env_ || "development"
|
env = env_ || "development"
|
||||||
|
@ -44,16 +43,17 @@ module.exports = (grunt) ->
|
||||||
if account.init
|
if account.init
|
||||||
grunt.log.writeln("=== initializating account")
|
grunt.log.writeln("=== initializating account")
|
||||||
|
|
||||||
result = exec(cmd + "account list")
|
|
||||||
grunt.log.writeln("running: #{cmd} account list")
|
grunt.log.writeln("running: #{cmd} account list")
|
||||||
|
result = exec(cmd + "account list")
|
||||||
|
grunt.log.writeln("finished")
|
||||||
grunt.log.writeln("=== output is #{result.output}")
|
grunt.log.writeln("=== output is #{result.output}")
|
||||||
if result.output.indexOf("Fatal") < 0
|
if result.output.indexOf("Fatal") < 0
|
||||||
grunt.log.writeln("=== already initialized")
|
grunt.log.writeln("=== already initialized")
|
||||||
address = result.output.match(/{(\w+)}/)[1]
|
address = result.output.match(/{(\w+)}/)[1]
|
||||||
else
|
else
|
||||||
grunt.log.writeln("running: #{cmd} account new")
|
grunt.log.writeln("running: #{cmd} account new")
|
||||||
output = sh.exec(cmd + " account new")
|
output = exec(cmd + " account new")
|
||||||
address = output.stdout.match(/{(\w+)}/)[1]
|
address = output.output.match(/{(\w+)}/)[1]
|
||||||
|
|
||||||
if address isnt undefined
|
if address isnt undefined
|
||||||
cmd += "--unlock #{address} "
|
cmd += "--unlock #{address} "
|
||||||
|
|
Loading…
Reference in New Issue