Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11753] CLI: titanium config paths.sdks arg0 is additive, should replace entire path

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-08-12T21:02:28.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 JS
ComponentsCLI
Labelscli, qe-cli, qe-manualtest
ReporterDustin Hyde
AssigneeChris Barber
Created2012-11-13T22:18:12.000+0000
Updated2014-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"
		]
	},

Comments

  1. Bryan Hughes 2012-11-13

    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.
  2. Bryan Hughes 2012-11-14

    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)
  3. Paras Mishra 2013-01-21

    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
  4. Olga Romero 2014-08-12

    reopened to correct labels

JSON Source