Skip to content

Commit

Permalink
Fixes mozilla-jetpack#5: Import jpm/lib/cmd.
Browse files Browse the repository at this point in the history
This also removes an anti-pattern which turns informative stack traces
into extremely difficult to debug single line logs.
  • Loading branch information
ncalexan committed Jun 12, 2015
1 parent e30aec2 commit 5f4455c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/jpm-mobile
Expand Up @@ -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();

Expand All @@ -24,15 +25,15 @@ 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
.command("test")
.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) {
Expand Down

2 comments on commit 5f4455c

@gliptak
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 After patching, this allowed jpm-mobile to run on my local

@fabacab
Copy link

@fabacab fabacab commented on 5f4455c Dec 8, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I got the same results as @gliptak. Thx for the patch.

Please sign in to comment.