pixie-lang/pixie — pull request #71 by heyLu (2014-11-16 09:22:36+00:00)
Title: Improve load path/batch mode

Basically, we try to find the full path to the vm by looking if it exists in the current directory, looking it up in `$PATH` if that fails and finally resolving the path we got if it was a symlink.

This should fix #59 and #67.

Remaining issues:

* If there is a file in the current directory that has the same name as the pixie interpreter, we will segfault. (E.g. if you have `pixie-vm` in your `$PATH`, but also an unrelated file called `pixie-vm` in the current directory, it will fail. If anyone has a good idea how to ensure this works, tell me.)
* batch mode still segfaults when you try to execute a file that you don't have access to
* one one level of symlinks to the interpreter is allowed (i think this is ok, this patch is complex enough without it)