Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24691] Forked correct SDK command args doesn't resolve platform when using short flag

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-05-13T03:49:46.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.1.0
ComponentsTooling
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2017-05-12T21:25:48.000+0000
Updated2017-05-15T18:04:27.000+0000

Description

When you run a build where the selected SDK differs from the one in the tiapp.xml, it forks the correct sdk build command. However, if you specify the platform as \-p instead of \-\-platform, it doesn't define platform and thus the platform is never injected into the forked command arguments. Since Studio always passes in \-\-platform, this really only affects CLI users. When \-\-platform is not set in the forked command args, it will simply prompt for the platform (or error and exit if prompting is disabled).

Comments

  1. Chris Barber 2017-05-12

    TiSDK master PR: https://github.com/appcelerator/titanium_mobile/pull/9059 TiSDK 6_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/9060
  2. Chris Barber 2017-05-15

    To test: 1. Set the selected SDK to the version containing this fix 2. Set the <sdk-version> in the tiapp.xml to any other version 3. Run appc run \-p ios or any other platform (the key is you MUST use the \-p switch instead of \-\-platform) Near the top of the output you should see "Forking correct SDK command:" followed by the command and its arguments about to be spawned. Notice that \-p will have been replaced with \-\-platform <platform name>.
  3. Abir Mukherjee 2017-05-15

    Node Version: 6.10.1 NPM Version: 3.10.10 Mac OS: 10.12.4 Appc CLI: 6.2.2-master.7 Appc CLI NPM: 4.2.9 Titanium SDK Select version: 6.0.4.GA Titanium SDK tiapp.xml version: 6.1.0.v20170514022959 Xcode 8.3.2 I followed the instructions in Chris Barber's comment, and validated the fix. I did see "Forking correct SDK command", and saw the --platform printed in the output.

JSON Source