From 2fb91557dbae2b5ea523e937fa43f65585a92bfe Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 24 May 2015 16:29:37 -0400 Subject: [PATCH] remove execSync --- boilerplate/package.json | 1 - package.json | 1 - tasks/blockchain.coffee | 8 ++++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/boilerplate/package.json b/boilerplate/package.json index c9c6cbfa..81732180 100644 --- a/boilerplate/package.json +++ b/boilerplate/package.json @@ -13,7 +13,6 @@ "embark-framework": "^0.0.1", "commander": "^2.8.1", "compression": "^1.4.3", - "execSync": "^1.0.2", "express": "^4.12.3", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-coffee": "^0.13.0", diff --git a/package.json b/package.json index 7a4c6977..efb1e7ca 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "dependencies": { "commander": "^2.8.1", "compression": "^1.4.3", - "execSync": "^1.0.2", "express": "^4.12.3", "grunt": "^0.4.5", "grunt-cli": "^0.1.13", diff --git a/tasks/blockchain.coffee b/tasks/blockchain.coffee index 8c3f76ea..89b2a953 100644 --- a/tasks/blockchain.coffee +++ b/tasks/blockchain.coffee @@ -1,7 +1,6 @@ module.exports = (grunt) -> readYaml = require('read-yaml') require('shelljs/global') - sh = require('execSync') grunt.registerTask "blockchain", "deploy ethereum node", (env_) => env = env_ || "development" @@ -44,16 +43,17 @@ module.exports = (grunt) -> if account.init grunt.log.writeln("=== initializating account") - result = exec(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}") if result.output.indexOf("Fatal") < 0 grunt.log.writeln("=== already initialized") address = result.output.match(/{(\w+)}/)[1] else grunt.log.writeln("running: #{cmd} account new") - output = sh.exec(cmd + " account new") - address = output.stdout.match(/{(\w+)}/)[1] + output = exec(cmd + " account new") + address = output.output.match(/{(\w+)}/)[1] if address isnt undefined cmd += "--unlock #{address} "