use path join

This commit is contained in:
Iuri Matias 2016-10-29 12:35:16 -04:00
parent bd3b05bb00
commit 60f487da38
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ var mkdirp = require('mkdirp');
var wrench = require('wrench'); var wrench = require('wrench');
var colors = require('colors'); var colors = require('colors');
var GethCommands = require('./geth_commands.js'); var GethCommands = require('./geth_commands.js');
var path = require('path');
var Blockchain = function(blockchainConfig, Client) { var Blockchain = function(blockchainConfig, Client) {
this.blockchainConfig = blockchainConfig; this.blockchainConfig = blockchainConfig;
@ -54,7 +55,7 @@ Blockchain.prototype.initChainAndGetAddress = function() {
mkdirp.sync(this.datadir); mkdirp.sync(this.datadir);
// copy mining script // copy mining script
wrench.copyDirSyncRecursive(__dirname + "/../js", ".embark/development/js", {forceDelete: true}); wrench.copyDirSyncRecursive(path.join(__dirname, "/../js"), ".embark/development/js", {forceDelete: true});
// check if an account already exists, create one if not, return address // check if an account already exists, create one if not, return address
result = this.runCommand(this.client.listAccountsCommand()); result = this.runCommand(this.client.listAccountsCommand());