Skip to content
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

Difference in hookArgs.prepareData.platform #4963

Closed
PeterStaev opened this issue Aug 20, 2019 · 2 comments
Closed

Difference in hookArgs.prepareData.platform #4963

PeterStaev opened this issue Aug 20, 2019 · 2 comments
Labels
bug debug hooks Describes issues related to hooks prepare Describes issues related to prepare command preview Describes issues related to preview command run Describes issues related to run command unit testing
Milestone

Comments

@PeterStaev
Copy link
Contributor

PeterStaev commented Aug 20, 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: 6.0.3
  • Cross-platform modules: 6.0.6
  • Android Runtime: 6.0.1
  • iOS Runtime: 6.0.0
  • Plugin(s):

Describe the bug
There is a difference in the casing of the platform that is sent to an after-prepare hook.

To Reproduce
Create a simple plugin with an after-prepare hook having the following:

module.exports = function (hookArgs) {
  console.log("PLATFORM: ", hookArgs.prepareData.platform)
}

Execute:

tns prepare ios

Output:

PLATFORM: ios

Execute:

tns run ios

Output:

PLATFORM: iOS

Expected behavior
The platform should be made consistent no matter which CLI command you are executing.

Sample project

Additional context

@rosen-vladimirov rosen-vladimirov added bug debug hooks Describes issues related to hooks prepare Describes issues related to prepare command preview Describes issues related to preview command run Describes issues related to run command unit testing labels Aug 22, 2019
@rosen-vladimirov
Copy link
Contributor

Hey @PeterStaev ,
Thanks for sharing this issue. We've successfully reproduced it on our side based on your descriptions and it is definitely not expected to have the platform with different casing based on the executed command.

@azozen
Copy link

azozen commented Aug 27, 2019

اوك الأمور ما اعرفها

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug debug hooks Describes issues related to hooks prepare Describes issues related to prepare command preview Describes issues related to preview command run Describes issues related to run command unit testing
Projects
None yet
Development

No branches or pull requests

4 participants