Project: titanium
Issue TIMOB-17605: CLI: CLI throws an error while reading platform input value given for “ti build -p” or “ti build —platform” commands.
Description: Running "ti build -p" prompts the user to pick a platform but gives an error while reading the valid input value. Running "ti build --platform" prompts the user to pick a platform but gives an error while reading the valid provided value. The same error is thrown with CLI 3.3.0 Titanium SDK 3.3.0.GA. STEPS TO REPRODUCE 1. Open a terminal window 2. Create a project and you have to "cd" to this project to be able to run command "build" 3. Run "ti build -p" command. 4. Run "ti build --platform" command. EXPECTED RESULT 3. CLI should read the user provided platform value successfully and then build the project. 4. CLI should read the user provided platform value successfully and then build the project. ACTUAL RESULT CLI throws an error while reading the user provided platform value and hence unable to build project successfully. {code} KAGRAWAL-MBP:name kagrawal$ ti build Titanium Command-Line Interface, CLI version 3.4.0-dev, Titanium SDK version 3.4.0.v20140829184521 Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved. Please report bugs to http://jira.appcelerator.org/ Target platform to build for: 1) android 2) blackberry 3) ios 4) mobileweb Enter # or platform name: KAGRAWAL-MBP:name kagrawal$ clear KAGRAWAL-MBP:name kagrawal$ ti build -p Titanium Command-Line Interface, CLI version 3.4.0-dev, Titanium SDK version 3.4.0.v20140829184521 Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved. Please report bugs to http://jira.appcelerator.org/ Target platform to build for: 1) android 2) blackberry 3) ios 4) mobileweb Enter # or platform name: ios [ERROR] Invalid platform "" Did you mean this? android blackberry ios mobileweb Available platforms for SDK version 3.4.0.v20140829184521: android blackberry ios mobileweb KAGRAWAL-MBP:name kagrawal$ ti build --platform Titanium Command-Line Interface, CLI version 3.4.0-dev, Titanium SDK version 3.4.0.v20140829184521 Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved. Please report bugs to http://jira.appcelerator.org/ Target platform to build for: 1) android 2) blackberry 3) ios 4) mobileweb Enter # or platform name: 3 [ERROR] Invalid platform "" Did you mean this? android blackberry ios mobileweb Available platforms for SDK version 3.4.0.v20140829184521: android blackberry ios mobileweb {code}
Story points: 3