Merge branch 'main' into chore-update-version-ember-a11y-testing

This commit is contained in:
Carlos Alcaide Corvo authored and GitHub committed 2021-06-08 14:03:42 -07:00
commit bbb703c671
2 files changed
+4 -3

No files matched your search

@@ -1,7 +1,6 @@
const { path } = require('../cli/path.js');
const { spawn, spawnSync } = require('child_process');
const jsonify = require('../utils/jsonify.js');
const { isWindows } = require('../helpers/platform.js');
// You can throw exceptions, or allow them to occur, and this is supported.
// Exceptions thrown in this way will be returned to the UI as an
@@ -28,7 +27,7 @@ module.exports = {
*/
spawnAsyncJSONPromise(command) {
return new Promise((resolve, reject) => {
const childProcess = spawn(path(), command, { shell: isWindows() });
const childProcess = spawn(path(), command);
let outputStream = '';
let errorStream = '';
@@ -56,6 +55,8 @@ module.exports = {
childProcess.stderr.on('error', processError);
childProcess.stderr.on('data', processError);
// Capture spawn errors
childProcess.on('error', (error) => reject(error));
});
},
@@ -39,7 +39,7 @@ class Session {
* @return {boolean}
*/
get isRunning() {
return !this.#process.killed;
return this.#process && !this.#process.killed;
}
/**