[AC-3305] Running ti --help when not in a project directory errors
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2014-11-21T22:44:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator CLI |
Labels | n/a |
Reporter | Stephen Feather |
Assignee | Chris Barber |
Created | 2014-11-21T22:29:01.000+0000 |
Updated | 2016-03-08T07:57:43.000+0000 |
Description
Problem
Runti --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
At first glance, you might think this is a Titanium CLI issue when in fact it is a user error. Try this:
Works, right? Now, try this:
Still works! Open a NEW terminal and run:
Switch back to the first terminal and run:
Oh noes! Take Titanium CLI out of the equation and just try running Node:
In short, you cannot run Node.js in a folder that no longer exists.