Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16298] CLI: Running "ti create -p" throws errors, instead should ask what platform you wish to use

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-02-28T00:47:46.000+0000
Affected Version/sRelease 3.2.1
Fix Version/s2014 Sprint 04, 2014 Sprint 04 Core, Release 3.2.3, Release 3.3.0
ComponentsCLI
Labelsqe-3.2.1, qe-closed-3.2.3, qe-testadded
ReporterSamuel Dowse
AssigneeChris Barber
Created2014-01-23T18:24:41.000+0000
Updated2014-03-24T21:29:35.000+0000

Description

Description

Running "ti create" prompts the user to pick a platform for the project. Running "ti create -p" skips that step and prompts for the App ID. No matter what is entered the user will get
[ERROR] TypeError: Object true has no method 'toLowerCase'
    at exports.scrubPlatforms (/Users/sdowse/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140122175749/node_modules/titanium-sdk/lib/titanium.js:624:12)
    at options.appc.util.mix.id.prompt.validator (/Users/sdowse/Library/Application Support/Titanium/mobilesdk/osx/3.2.1.v20140122175749/cli/commands/create.js:76:26)
    at fields.text.validate (/usr/local/lib/node_modules/titanium/lib/cli.js:1018:12)
    at Text.<anonymous> (/usr/local/lib/node_modules/titanium/node_modules/fields/lib/prompter.js:169:21)
    at EventEmitter.emit (events.js:98:17)
    at emitKey (/usr/local/lib/node_modules/titanium/node_modules/fields/node_modules/keypress/index.js:344:12)
    at onData (/usr/local/lib/node_modules/titanium/node_modules/fields/node_modules/keypress/index.js:39:7)
    at EventEmitter.emit (events.js:95:17)

Steps To Reproduce

1. Open a terminal window 2. Run 'ti create -p' 3. Type in a valid App ID

Expected Result

The CLI should notice the missing parameters for the platform and ask for a valid input.

Actual Result

The CLI moves on to the App ID, then fails to create.

Comments

  1. Chris Barber 2014-01-30

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5285 3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5286
  2. Olga Romero 2014-03-24

JSON Source