Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2065] titanium cli wans't shifting argv right

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2013-12-28T18:34:30.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labels3.2.0,, beta, cli,, node, titanium,
ReporterRăzvan Rădulescu
AssigneeChris Barber
Created2013-12-11T22:48:20.000+0000
Updated2016-03-08T07:41:01.000+0000

Description

Comments

  1. Alberto Marcone 2013-12-23

    same thing here, but your solution didn't work. Did you just comment the if part and applied the shift no matter what?
  2. Allan Brazute 2013-12-23

    After the update to 3.2.0, on my Ubuntu 12.04, the ti command started to give the same error and the Titanium Studio was not detecting the Android SDK. So I edited the cli.js as mentioned above and it started to work and detected the Android SDK. Thanks
  3. Răzvan Rădulescu 2013-12-24

    [~a.marcone] that's exactly what I did. I commented the if out and applied the shift no matter what. It doesn't break anything as far as I can tell on my machine.
  4. Chris Barber 2013-12-28

    This is a dupe of TIMOB-15804.
  5. Charles Hardnett 2014-01-13

    What worked for me was to replace the if statement with:
       if (args[0].replace(/\\/g, '/').replace(/js$/,'').split('/').pop().replace(/\.exe$/, '') == proce~ss.execPath.replace(/\\/g, '/').replace(/js$/,'').split('/').pop().replace(/\.exe$/, '')) {
       
    found here [http://developer.appcelerator.com/question/160741/titanium-cli-32-doesnt-work-on-ubuntu-because-it-doesnt-strip-the-node-executable-from-the-args]

JSON Source