I can't seem to use certain commands from the ionic CLI from non-terminals.
This code:
<?php
shell_exec('ionic package list');
Will result in something along the lines of:
> [email protected] postinstall /home/ubuntu/workspace/storage/ap"...
The resources folder already exists. We will not overwrite your files unless you pass the --force argument.
Running with the force flag will overwrite your resources directory and modify your config.xml file
splash ios Default-Landscape@~ipadpro.png (2732x2048) skipped, source image splash.png (2208x2208) too small
splash ios Default-Portrait@~ipadpro.png (2048x2732) skipped, source image splash.png (2208x2208) too small
TypeError: process.stdout.getWindowSize is not a function
at /home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/lib/ionic/package.js:181:42
at _fulfilled (/home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:749:13)
at /home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:557:44
at flush (/home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:108:17)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
process.stdout.getWindowSize is not a function (CLI v2.0.0-beta.30)
I'm building a Laravel app to display the status of some running build tasks.
Something... less... error-y?
Steps to reproduce:
Other information:
Here's the my ionic info
Your system information:
Cordova CLI: Not installed
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS
Node Version: v4.4.0
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova`
******************************************************
I don't think I need Cordova as I'm not packaging (if that requires Cordova at all?) or compiling the app here.
Which Ionic Version? 1.x or 2.x
CLI v2.0.0-beta.30
Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum (forum.ionicframework.com). Thanks for using Ionic!
this is a bug! A console script that errors out when u try to assign its output to a variable or a file is clearly buggy.
If we were able to parse the output of ionic list package we would be able to determine the last good build and then feed the build id to ionic package download for example.
CLI scripting is all about being able to chain commands one after the other, imho.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.