Skip to content

fix: check correctly for passed --bundle option #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

In case --bundle is not passed, the before-checkForChanges hook should stop the execution. However, in case --bundle is passed, it should allow the process to continue. Currently, even when --bundle is passed, the hook breaks the execution with error that you need to pass --bundle. The problem is that the hook checks the flag based on CLI's internal representation of the flag, but the internal structure has been changed since the PR that added this functionality has been added. Fix the hook to have correct check for bundle flag.

In case `--bundle` is not passed, the `before-checkForChanges` hook should stop the execution. However, in case `--bundle` is passed, it should allow the process to continue. Currently, even when `--bundle` is passed, the hook breaks the execution with error that you need to pass `--bundle`. The problem is that the hook checks the flag based on CLI's internal representation of the flag, but the internal structure has been changed since the PR that added this functionality has been added. Fix the hook to have correct check for bundle flag.
@rigor789
Copy link
Member

@rosen-vladimirov thanks for the quick PR!

Does the other before-watch.js hook also need tweaking or that one should be correct?

@rosen-vladimirov
Copy link
Contributor Author

rosen-vladimirov commented Mar 18, 2019

@rigor789 , the other hook is correct, I've tried the changes in this PR in a project and everything works finе:

  • when --bundle is passed the app is build and deployed on device
  • when --bundle is not passed, the hook breaks the process with error describing that you need to pass --bundle

@rigor789 rigor789 merged commit acbc18b into nativescript-vue:master Mar 18, 2019
@rosen-vladimirov rosen-vladimirov deleted the patch-1 branch March 18, 2019 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants