aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler')
-rw-r--r--packages/sol-compiler/coverage/.gitkeep0
-rw-r--r--packages/sol-compiler/package.json2
-rw-r--r--packages/sol-compiler/src/cli.ts7
-rw-r--r--packages/sol-compiler/test/compiler_test.ts2
4 files changed, 7 insertions, 4 deletions
diff --git a/packages/sol-compiler/coverage/.gitkeep b/packages/sol-compiler/coverage/.gitkeep
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/packages/sol-compiler/coverage/.gitkeep
diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json
index 8c2a10783..745760cd0 100644
--- a/packages/sol-compiler/package.json
+++ b/packages/sol-compiler/package.json
@@ -14,7 +14,7 @@
"compile": "npm run build; node lib/src/cli.js compile",
"clean": "shx rm -rf lib scripts",
"migrate": "npm run build; node lib/src/cli.js migrate",
- "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
+ "lint": "tslint --project .",
"test:circleci": "yarn test:coverage",
"docs:stage": "yarn build && node ./scripts/stage_docs.js",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
diff --git a/packages/sol-compiler/src/cli.ts b/packages/sol-compiler/src/cli.ts
index 2412b8d34..90b4949bc 100644
--- a/packages/sol-compiler/src/cli.ts
+++ b/packages/sol-compiler/src/cli.ts
@@ -1,7 +1,7 @@
#!/usr/bin/env node
// We need the above pragma since this script will be run as a command-line tool.
-import { BigNumber } from '@0xproject/utils';
+import { BigNumber, logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import * as path from 'path';
@@ -38,4 +38,7 @@ const SEPARATOR = ',';
};
const compiler = new Compiler(opts);
await compiler.compileAsync();
-})();
+})().catch(err => {
+ logUtils.log(err);
+ process.exit(1);
+});
diff --git a/packages/sol-compiler/test/compiler_test.ts b/packages/sol-compiler/test/compiler_test.ts
index 9baf433d4..7ccaeef07 100644
--- a/packages/sol-compiler/test/compiler_test.ts
+++ b/packages/sol-compiler/test/compiler_test.ts
@@ -37,7 +37,7 @@ describe('#Compiler', function() {
const exchangeArtifactString = await fsWrapper.readFileAsync(exchangeArtifactPath, opts);
const exchangeArtifact: ContractArtifact = JSON.parse(exchangeArtifactString);
// The last 43 bytes of the binaries are metadata which may not be equivalent
- const unlinkedBinaryWithoutMetadata = exchangeArtifact.compilerOutput.evm.bytecode.object.slice(0, -86);
+ const unlinkedBinaryWithoutMetadata = exchangeArtifact.compilerOutput.evm.bytecode.object.slice(2, -86);
const exchangeBinaryWithoutMetadata = exchange_binary.slice(0, -86);
expect(unlinkedBinaryWithoutMetadata).to.equal(exchangeBinaryWithoutMetadata);
});