Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3305] Running ti --help when not in a project directory errors

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2014-11-21T22:44:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator CLI
Labelsn/a
ReporterStephen Feather
AssigneeChris Barber
Created2014-11-21T22:29:01.000+0000
Updated2016-03-08T07:57:43.000+0000

Description

Problem

Run
ti --help
when not in a project directory and you receive an error that means nothing:
17:24 $ ti --help

node.js:815
    var cwd = process.cwd();
                      ^
Error: ENOENT, no such file or directory
    at Function.startup.resolveArgv0 (node.js:815:23)
    at startup (node.js:58:13)
    at node.js:906:3

Expectation

When ti --help is run, the user should receive the help information

Comments

  1. Chris Barber 2014-11-21

    At first glance, you might think this is a Titanium CLI issue when in fact it is a user error. Try this:
       cd /
       ti --help
       
    Works, right? Now, try this:
       mkdir ~/iowechrisabeer
       cd ~/iowechrisabeer
       ti --help
       
    Still works! Open a NEW terminal and run:
       cd ~
       rm -rf ~/iowechrisabeer
       
    Switch back to the first terminal and run:
       ti --help
       
    Oh noes! Take Titanium CLI out of the equation and just try running Node:
       node
       
    In short, you cannot run Node.js in a folder that no longer exists.

JSON Source