[TIMOB-14933] CLI: Builds where tiapp.xml sdk-version differs from selected SDK fail to properly fork in Windows
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-08-27T22:16:56.000+0000 |
Affected Version/s | Release 3.1.2 |
Fix Version/s | 2013 Sprint 18 Core, 2013 Sprint 18, Release 3.2.0 |
Components | CLI |
Labels | qe-closed-3.2.0 |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2013-08-21T20:05:11.000+0000 |
Updated | 2013-12-04T18:34:04.000+0000 |
Description
The CLI tries to strip the first argument if it's the actual "node" executable before parsing the args. The problem is on Windows the node executable can sometimes contain the .exe and the following line of code fails:
// cli.js (line 218)
args[0].slice(-4) === 'node' && args.shift();
This line needs to look like this:
args[0].replace(/\\/g, '/').split('/').pop() == process.execPath.replace(/\\/g, '/').split('/').pop().replace(/\.exe$/, '') && args.shift();
To test: 1) Find a Windows machine 2) Install the Titanium CLI 3.1.2 3) Download Titanium SDK 3.1.1.GA and 3.1.2.GA 4) Set Titanium SDK 3.1.2.GA the selected SDK (ti sdk select 3.1.2.GA) 5) Apply the PR fix to titanium/lib/cli.js 6) Create an app and set the app's
Pull request: https://github.com/appcelerator/titanium/pull/54
Verified fixed on: Windows 7 Titanium Studio, build: 3.2.0.201311262027 Titanium SDK, build: 3.2.0.v20131127194046 CLI: 3.2.0-beta Alloy: 1.3.0-beta If tiapp.xml sdk differs from the selected sdk in CLI, then CLI will fork the correct SDK and build successfully.
Closing.