Ionic package list - error when output to variable in bash

I am in great need of assistance, I would like my server to know when a build is ready, however I keep getting an error when running the command “OUTPUT=$(ionic package list)” in bash, I am using the latest OSX version on my Mac Mini.

The reason for the command is to read the output line by line once I can get in into a variable.

#! /bin/bash

cd /path-to-app-folder


ionic package list

Does NOT work: TypeError: process.stdout.getWindowSize is not a function

OUTPUT="$(ionic package list)"
echo $OUTPUT

i’m getting the same error only that it happens with the normal $ ionic package list

$ ionic package list

TypeError: process.stdout.getWindowSize is not a function
    at C:\Users\Maribel\obed\Roaming\npm\node_modules\ionic\lib\ionic\package                                                                                                                .js:164:42
    at _fulfilled (C:\Users\obed\AppData\Roaming\npm\node_modules\ionic\node_                                                                                                                modules\q\q.js:787:54)
    at self.promiseDispatch.done (C:\Users\obed\AppData\Roaming\npm\node_modu                                                                                                                les\ionic\node_modules\q\q.js:816:30)
    at Promise.promise.promiseDispatch (C:\Users\obed\AppData\Roaming\npm\nod                                                                                                                e_modules\ionic\node_modules\q\q.js:749:13)
    at C:\Users\obed\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.                                                                                                                js:557:44
    at flush (C:\Users\obed\AppData\Roaming\npm\node_modules\ionic\node_modul                                                                                                                es\q\q.js:108:17)
    at nextTickCallbackWith0Args (node.js:415:9)
    at process._tickCallback (node.js:344:13)

process.stdout.getWindowSize is not a function (CLI v2.0.0-beta.25)

Your system information:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS: Windows 7
Node Version: v4.3.2