From 6fa20fa8ea4c25d45381e55b6b4365204687f491 Mon Sep 17 00:00:00 2001 From: Daniel Constantin Date: Sun, 6 Jan 2019 08:58:40 +0200 Subject: [PATCH] Create a new ganache db for each version --- src/commands/devchain.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/devchain.js b/src/commands/devchain.js index a5f55dad3..c6177f327 100644 --- a/src/commands/devchain.js +++ b/src/commands/devchain.js @@ -10,6 +10,7 @@ const mkdirp = require('mkdirp') const chalk = require('chalk') const fs = require('fs') const listrOpts = require('../helpers/listr-options') +const pjson = require('../../package.json') const { BLOCK_GAS_LIMIT, MNEMONIC } = require('../helpers/ganache-vars') @@ -43,7 +44,10 @@ exports.task = async function({ const mkDir = promisify(mkdirp) const recursiveCopy = promisify(ncp) - const snapshotPath = path.join(os.homedir(), `.aragon/ganache-db-${port}`) + const snapshotPath = path.join( + os.homedir(), + `.aragon/ganache-db-${pjson.version}` + ) const tasks = new TaskList( [