"Simple" question -- I'm trying to get the path to a directory of a node script, but when I run from a symlinked directory, I keep getting the path to the physical file instead of the path to the symlinked structure. How do I get the symlinked path?
/path/to/symlink --> /path/to/real
/path/to/symlink> node echo.js
# echo.js
console.log( __dirname ); // /path/to/real
console.log( process.cwd() ); // /path/to/real
[edit] Just for clarification of my own sanity:
$ mkdir test
$ cd test
test$ mkdir a
test$ ln -s a b
test$ cd b
b$ node
> process.cwd()
'/test/a'