ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Exit codes for Ionic

Open jgw96 opened this issue 10 years ago • 9 comments

From @cincuranet on October 19, 2016 6:10

I'm trying to script whole build-test-stage-publish process using Ionic 2, but it's really difficult because running i.e. ionic build ios always returns 0.

It should return some non-zero exit code when some error occurred.

Copied from original issue: driftyco/ionic#8791

jgw96 avatar Oct 19 '16 18:10 jgw96

An example.

example

The xcodebuild ended with 65, while the ionic build ios returned still 0 (and hence everything looked fine).

cincuranet avatar Oct 20 '16 06:10 cincuranet

I faced the same issue when I want to automate the build process. In my case there was a weired error in the lint step that made the build to exit with an error but it was treated as OK and the CI uploaded an empty app. I use travis as CI, did an ionic build in the script step and an ionic upload in after_success so it should not upload anything when anything happen that makes the build not finishing completely.

packowitz avatar Oct 26 '16 04:10 packowitz

Is the problem simply that the exit code of the app-script is not forwarded to npm ?

pvdyck avatar Dec 13 '16 14:12 pvdyck

When is planned to fix that?

schiller256 avatar Feb 02 '17 10:02 schiller256

+1

ambrosiawt avatar Feb 26 '17 22:02 ambrosiawt

+1 We're using TFS to automate builds and have the same problem. If there is an error in the build process, the exit code is always 0 and therefore the build status is always "Build succeeded" even if it fails. Please fix this issue asap.

hrzi avatar Mar 14 '17 16:03 hrzi

+1

guibernardino avatar Mar 15 '17 18:03 guibernardino

This is not an issue with the latest CLI.

imhoffd avatar Jul 12 '18 19:07 imhoffd

Thanks for the issue! This issue appears to be associated with an old version of the Ionic CLI. Please update to the latest CLI version, which supports all versions of the Ionic Framework. If the issue is relevant and if it persists after updating to the latest CLI version, please create a new issue.

Thank you for using Ionic!

ionitron-bot[bot] avatar Jul 12 '18 19:07 ionitron-bot[bot]