Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-2065

titanium cli wans't shifting argv right

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: None
    • Component/s: None
    • Environment:

      Ubuntu 13.10

      Description

      With the new titanium@3.2.0-beta I was getting this error:

      razvan@laptop:~$ ti help
      Titanium Command-Line Interface, CLI version 3.2.0-beta, Titanium SDK version 3.1.3.GA
      Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.
       
      Please report bugs to http://jira.appcelerator.org/
       
      [ERROR] "/usr/bin/ti" is an unrecognized command.
       
      Run 'node help' for available commands.
      

      And after some searching I pinpointed it to this:

      if (args[0].replace(/\\/g, '/').split('/').pop().replace(/\.exe$/, '') == process.execPath.replace(/\\/g, '/').split('/').pop().replace(/\.exe$/, '')) {
      	args.shift();
      }
      

      at line 91 in titanium/lib/cli.js. After some digging I found out that my /usr/bin/node was a symlink to /etc/alternatives/node which was again a symlink to /usr/bin/nodejs so when the if statement was performed there was no shifting in argv thus leading to the error. I changed cli.js not to include the if statement there and just apply shift() and now everything works.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                razvanc87@gmail.com Răzvan Rădulescu
              • Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Integration