Add balena envs '-j' option to produce JSON output

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
Paulo Castro
2019-12-05 17:09:02 +00:00
parent 630d53311a
commit df58ac7673
7 changed files with 265 additions and 11 deletions

View File

@ -21,9 +21,10 @@ import * as nock from 'nock';
import * as path from 'path';
import * as balenaCLI from '../build/app';
import { configureBluebird } from '../build/app-common';
import { configureBluebird, setMaxListeners } from '../build/app-common';
configureBluebird();
setMaxListeners(15); // it appears that using nock adds some listeners
export const runCommand = async (cmd: string) => {
const preArgs = [process.argv[0], path.join(process.cwd(), 'bin', 'balena')];