Repository: ember-cli/ember-try (js)

Issue:
`ember try:ember` dies after first failed scenario with 1.0.0-beta.3
When using ember-try 1.0.0-beta.3, `ember try:ember` exits immediately after a single scenario fails, without running the remaining scenarios or outputting the summary. (0.2.23 and 1.0.0-beta.1 work as expected.)

I created a new addon as a testcase, with a single failing test in it: https://github.com/pgengler/ember-try-testcase

To reproduce:
1) Clone the test addon and run `yarn install`.
2) Run `ember try:ember`. Only the "default" scenario runs, and execution stops with an error message displayed ([see output](https://gist.github.com/pgengler/e8d617a6cf43764b31593f8eac6b247d))

To see beta-1 behavior:
1) Check out the `beta-1` branch of the test addon and run `yarn install`.
2) Run `ember try:ember`. The scenarios all run to completion. ([see output](https://gist.github.com/pgengler/04c0c2cda6a00320dfde63549220c9f4))

Pull request description:
Handle non-zero exit from commands run in a way needed by execa
Fixes #197

Patch:
diff --git a/lib/utils/run.js b/lib/utils/run.js
index dbb2fab..a4e8c25 100644
--- a/lib/utils/run.js
+++ b/lib/utils/run.js
@@ -17,9 +17,8 @@ module.exports = function run(command, args, opts) {
 
   debug('spawned with execa.shell', cmdArgs, opts);
 
-  return child.then((child) => {
-    if (child.code !== 0) {
-      return Promise.reject(child.code);
-    }
+  return child.catch((error) => {
+    debug('error', error);
+    return Promise.reject(error.code);
   });
 };


Test patch:
diff --git a/test/utils/run-test.js b/test/utils/run-test.js
new file mode 100644
index 0000000..aeda1f5
--- /dev/null
+++ b/test/utils/run-test.js
@@ -0,0 +1,15 @@
+'use strict';
+
+const expect = require('chai').expect;
+
+describe('utils/run', () => {
+  it('rejects if command exits non-zero', () => {
+    let run = require('../../lib/utils/run');
+
+    return run('exit 1', [], {}).then(() => {
+      expect(true).to.equal(false, 'Should not succeed');
+    }).catch((res) => {
+      expect(res).to.equal(1, 'Should reject with exit code');
+    });
+  });
+});