The Titanium CLI 3.2.0 doesn't run any commands I enter on Ubuntu 13.10.
When running the Titanium CLI without any arguments, I get a message:
Titanium Command-Line Interface, CLI version 3.2.0, Titanium SDK version 3.2.0.GA Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
[ERROR] "/usr/bin/titanium" is an unrecognized command.
Run 'nodejs help' for available commands.
I traced it down to these lines in cli.js
// strip the node executable from the args
var args = this.argv.$_;
if (args[0].replace(/\\/g, '/').split('/').pop().replace(/\.exe$/, '') == process.execPath.replace(/\\/g, '/').split('/').pop().replace(/\.exe$/, '')) {
args.shift();
}
The if returns false because args[0] is node, but process.execPath is /usr/bin/nodejs under Ubuntu.
Because of a naming conflict with an older package (see Node Ubuntu notes), the node executable in Ubuntu is called nodejs. /usr/bin/node is symlinked to /usr/bin/nodejs
I currently work around the issue by removing the extra 'js' at the end of the executable name with the following change to cli.js:
if (args[0].replace(/\\/g, '/').replace(/js$/,'').split('/').pop().replace(/\.exe$/, '') == proce~ss.execPath.replace(/\\/g, '/').replace(/js$/,'').split('/').pop().replace(/\.exe$/, '')) {
I can create a JIRA ticket with this info.