From 3fb2fcbdfe2d3ed49b8211bc14c7bedb225cd270 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Mon, 4 May 2015 01:41:41 -0700 Subject: [PATCH] Rig some more cli things --- package.json | 2 +- src/cli.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4a4e596..4a9b2c6 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "lib/main.js", "scripts": { "compile": "babel --stage 0 -d lib/ src/ && babel --stage 0 -d test-dist/ test/", - "prepublish": "npm run compile", + "prepublish": "npm run compile && chmod +x ./lib/cli.js", "test": "npm run compile && mocha test-dist/*" }, "bin": { diff --git a/src/cli.js b/src/cli.js index c425f1a..4799d96 100644 --- a/src/cli.js +++ b/src/cli.js @@ -1,3 +1,5 @@ +#!/usr/bin/env node + require('babel/polyfill'); import {installNodeHeaders, rebuildNativeModules} from './main.js'; @@ -42,6 +44,7 @@ installNodeHeaders(argv.v) .then(() => rebuildNativeModules(argv.v, argv.m)) .then(() => process.exit(0)) .catch((e) => { - console.error(e); + console.error(e.message); + console.error(e.stack); process.exit(-1); });