ionic-team / ionic-team/ionic-cli

Building Android with --production flag prevents cmd/script from exiting properly

Đang mở
#3,349 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

# Bug Report

**Ionic Info**

```
cli packages: (C:\Users\Administrator\AppData\Roaming\nvm\v9.4.0\node_modules)

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0

System:

Node : v9.4.0
npm : 5.6.0
OS : Windows 10

Misc:

backend : pro
```

**Describe the Bug**

Building a production build of a ionic cordova android apk causes batch scripts to hang indefinitely until the script window is force terminated. Note this only happens when using the --release flag. If the release flag is not used, then batch scripts exit successfully

i.e.
```
Running `ionic cordova build android` builds a valid APK and exits with 0

Running 'ionic cordoca build --release android' builds a valid APK but hangs on exit. It appears there is a npm process in the background preventing cmd from fully exiting when using the --production flag
```

**Steps to Reproduce**
Steps to reproduce the behavior:

1. Launch a new CMD terminal
2. Enter a Ionic workspace that can be build for Android
3. Run `ionic cordova build android` and wait for it to finish the build
4. Run `exit 0'
5. Note that CMD terminal should close successfully
6. Launch a new CMD terminal
7. Enter the same Ionic workspace as before
8. Run `ionic cordova build --release android` and wait for it to finish the build
9. Run `exit 0'
10. Note that CMD terminal hangs and has to be force closed

**Expected Behavior**
running `ionic cordova build --release android` should exit successfully after successful or failed builds without hanging the CMD instance.

**Additional Context**
This issue is preventing our build system from continuing after building a APK flagged with the --release flag. The only work around we have been able to find is to not use the production flag

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.