From 5f4455c072dcffad6c079ff6696164300ba76774 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Fri, 12 Jun 2015 14:24:11 -0700 Subject: [PATCH] Fixes #5: Import jpm/lib/cmd. This also removes an anti-pattern which turns informative stack traces into extremely difficult to debug single line logs. --- bin/jpm-mobile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/jpm-mobile b/bin/jpm-mobile index 0726591..50178a2 100755 --- a/bin/jpm-mobile +++ b/bin/jpm-mobile @@ -3,6 +3,7 @@ var path = require("path"); var program = require("commander"); var VERSION = require("../package.json").version; +var cmd = require("jpm/lib/cmd"); var run = require("../lib/run").run; var cwd = process.cwd(); @@ -24,7 +25,7 @@ program .description("Install and run the current addon in Firefox for Mobile.") .action(function () { var manifest = require(path.join(cwd, "package.json")); - run(manifest, makeOptions(program, "run")).then(null, console.error); + run(manifest, makeOptions(program, "run")) }); program @@ -32,7 +33,7 @@ program .description("Install, run, and test the current addon in Firefox for Mobile.") .action(function () { var manifest = require(path.join(cwd, "package.json")) - run(manifest, makeOptions(program, "test")).then(null, console.error); + run(manifest, makeOptions(program, "test")) }); function makeOptions(program, command) {