Project: appceleratorstudio
Issue TISTUD-4727: CodeProcessor: paths.commands and paths.hooks not set during 1.0.1-alpha install
h5. Description: While setting up for testing, I noticed that the code processor mention it has edited my ti config. Here is the output: {code} /usr/local/bin/titanium-code-processor -> /usr/local/lib/node_modules/titanium-code-processor/bin/codeprocessor > titanium-code-processor@1.0.1-alpha install /usr/local/lib/node_modules/titanium-code-processor > bin/install Notice: Modifying your Titanium Mobile configuration to include commands and hooks for the Titanium Code Processor. Run "titanium config" for more information titanium-code-processor@1.0.1-alpha /usr/local/lib/node_modules/titanium-code-processor {code} Although it seemed to work, my "ti config" had no paths.command entry, and no paths.hooks entry for code processor. We tried this on Olga's system (without an updated CLI) and she got: {code} /usr/local/bin/titanium-code-processor -> /usr/local/lib/node_modules/titanium-code-processor/bin/codeprocessor > titanium-code-processor@1.0.1-alpha install /usr/local/lib/node_modules/titanium-code-processor > bin/install Warning: Could not query the Titanium paths: fs.js:338 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ Error: EACCES, permission denied '/Users/oromero/.titanium/analytics.json' at Object.fs.openSync (fs.js:338:18) at Object.fs.writeFileSync (fs.js:756:15) at save (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/analytics.js:163:7) at /usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/analytics.js:206:4 at async.parallel (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:476:17) at async.forEach (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:94:25) at async.parallel (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:473:21) at process.on.async.parallel.osinfo (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/analytics.js:56:5) at module.exports.getOSInfo (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/environ.js:215:4) at ChildProcess.exithandler (child_process.js:538:7) The Titanium Code Processor will not be available in the CLI or during builds titanium-code-processor@1.0.1-alpha /usr/local/lib/node_modules/titanium-code-processor ├── colors@0.6.0-1 ├── wrench@1.5.1 ├── async@0.1.22 ├── mu2@0.5.17 ├── nomnom@1.6.1 (colors@0.5.1, underscore@1.4.4) ├── winston@0.6.2 (cycle@1.0.2, eyes@0.1.8, stack-trace@0.0.6, pkginfo@0.2.3, request@2.9.203) ├── xml2js@0.2.7 (sax@0.5.2) ├── source-map@0.1.22 (amdefine@0.0.5) ├── node-appc@0.1.30-alpha (sprintf@0.1.1, wrench@1.3.9, node-uuid@1.3.3, semver@1.1.4, request@2.9.203, uglify-js@1.3.4, xmldom@0.1.11) └── uglify-js@2.3.5 (async@0.2.8, optimist@0.3.7) {code} h5. Steps to reproduce: 1) Check your config with "ti config" and evaluate the paths.hooks and paths.commands. 2) Attempt to install titanium-code-processor with the following: "sudo npm install -g titanium-code-processor@1.0.1-alpha" 3) Recheck with "ti config" h5. Result: No changes made to the ti config, so code-processor may not function. h5. Expected Result: Either error with failure to update paths.x or success in editing ti config.
Story points: 5