Skip to content

incorrectly execution of hooks where there is unresolved injected dependency #4770

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

Closed
Fatme opened this issue Jun 26, 2019 · 0 comments
Closed
Assignees
Labels
bug hooks Describes issues related to hooks
Milestone

Comments

@Fatme
Copy link
Contributor

Fatme commented Jun 26, 2019

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: next
  • Cross-platform modules:
  • Android Runtime:
  • iOS Runtime:
  • Plugin(s):

Describe the bug

To Reproduce

  1. Create new application
  2. Create hooks directory if no such
  3. Create after-prepare directory under hooks directory if no such
  4. Create hook1.js, hook2.js and hook3.js inside after-prepare directory

hook1.js

module.exports = function() {
    console.log("=================== HOOK1 ================ ");
}

hook2.js

module.exports = function ($platformsData) {
    console.log("=================== HOOK2 =================== ");
}

hook3.js

module.exports = function() {
    console.log("=================== HOOK3 ================ ");
}
  1. Execute tns prepare ios

Actual behavior
You'll see the following output:

=================== HOOK1 ================ 
after-prepare will NOT be executed because it has invalid arguments - $platformsData.

Expected behavior
You should see the following output:

=================== HOOK1 ================ 
after-prepare will NOT be executed because it has invalid arguments - $platformsData.
=================== HOOK3 ================ 
@Fatme Fatme self-assigned this Jun 26, 2019
@Fatme Fatme added this to the 6.0.0 milestone Jun 26, 2019
@Fatme Fatme added bug hooks Describes issues related to hooks labels Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug hooks Describes issues related to hooks
Projects
None yet
Development

No branches or pull requests

2 participants