diff --git a/packages/cli/package.json b/packages/cli/package.json index 1e31240f6..71a2f9bd7 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -82,7 +82,6 @@ "semver": "^6.1.1", "source-map-support": "^0.5.11", "tmp-promise": "^2.0.1", - "truffle": "5.1.4", "truffle-flattener": "^1.2.9", "web3": "^1.2.4", "web3-utils": "^1.2.4", @@ -122,7 +121,8 @@ "nyc": "^14.1.1", "prettier": "^1.15.3", "proxyquire": "^2.1.0", - "sinon": "^7.3.1" + "sinon": "^7.3.1", + "truffle": "^5.1.6" }, "engines": { "node": ">=10.0.0" diff --git a/packages/cli/src/helpers/truffle-runner.js b/packages/cli/src/helpers/truffle-runner.js index 46bdc448a..a239932c4 100644 --- a/packages/cli/src/helpers/truffle-runner.js +++ b/packages/cli/src/helpers/truffle-runner.js @@ -1,12 +1,9 @@ import execa from 'execa' import devnull from 'dev-null' -import { getBinary, getPackageRoot } from '@aragon/toolkit' - -const truffleBin = getBinary('truffle', getPackageRoot(__dirname)) export const runTruffle = (args, { stdout, stderr, stdin }) => { return new Promise((resolve, reject) => { - const truffle = execa(truffleBin, args) + const truffle = execa('truffle', args, { preferLocal: true }) let errMsg = '' truffle.on('exit', code => { code === 0 ? resolve() : reject(errMsg)