[TIMOB-11753] CLI: titanium config paths.sdks arg0 is additive, should replace entire path
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-12T21:02:28.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 JS |
Components | CLI |
Labels | cli, qe-cli, qe-manualtest |
Reporter | Dustin Hyde |
Assignee | Chris Barber |
Created | 2012-11-13T22:18:12.000+0000 |
Updated | 2014-08-12T21:02:59.000+0000 |
Description
When 'titanium config paths.sdks /blah' is called, the config.json file concatenates a new path to the property: paths.sdks. It should update the path completely.
Steps to Reproduce:
1. Run 'titanium config paths.sdks /blah'.
2. Run 'titanium config paths.sdks /blah2'.
Actual Result:
.titanium/config.json changes paths.sdks to:
"paths": {
"commands": [],
"hooks": [],
"modules": [],
"plugins": [],
"sdks": [
"/blah",
"/blah2"
]
},
Expected Result:
Only one path value:
"paths": {
"commands": [],
"hooks": [],
"modules": [],
"plugins": [],
"sdks": [
"/blah2"
]
},
This behavior is by design because it would be a major pain to have to type a long list of SDKs every time you want to just add the latest.
Note: the ticket was re-opened because of several compelling use cases, but a more elegant solution than what is described in this ticket will be implemented (something where you can add, remove, or update individual sdk paths)
Executed successfully, titanium config paths.sdks 'value' overwrite the previous value in .titanium/config.json Verified on : SDK version: 3.0.1.v20130111165328 , 3.1.0.v20130111163212 CLI version : 3.0.22 OS : MAC OSX 10.8.2 XCode : 4.5.1
reopened to correct labels