vmware-archive / scripted

The Scripted code editor
Eclipse Public License 1.0
1.56k stars 166 forks source link

Invalid path due to 'bin' symlink #193

Closed navaru closed 11 years ago

navaru commented 11 years ago

Installed by using:

 ▸ npm install scripted -g

I use a Node.js Version Manager (nvm) which uses a symlink: $HOME/.nodejs/bin -> $HOME/.nodejs/v0.x.x/bin

Running scripted from terminal:

 ▸ scripted app.js 
ls: /Users/navaru/.nodejs/lib/node_modules/scripted/bin/scripted: No such file or directory

Version: 0.3.0

Edit 1: I've read that you need to add the $PATH, but it needs to be an easier way, I've also looked at the bash file and you can add a check to see if the scritped file is a symlink and point to the original file, but I know to do this only in bash

Edit 2: I've looked over the bash file scripted, why did you choose this method?

# If $0 is really a link, chase it down to the real location
linked=`ls -l "$0" | grep " -> "`
while [ ! -z "$linked" ]
...

There are compatibility issues over something like this in bash? test -h file && echo "is symlink" || echo "is regular file"

kdvolder commented 11 years ago

The batch scripts are now all replaced with node scripts (i.e all written in javascript). Could you try out the latest from head and see if symlinks are still a problem in the new scripts (I believe that they shouldn't be but won't close this bug until its confirmed.

Kris

navaru commented 11 years ago

Now it works :)

The package on npm should be updated, I believe is the simplest way to install scripted.

kdvolder commented 11 years ago

Thanks for confirming that it works for you now with master. Unfortunately the npm packages will probably not be updated until 0.4 is released.