Closed delexi closed 6 years ago
Previously if evm was invoked through a symlink instead of directly, __FILE__ pointed to the wrong file. It pointed to the symlink, not the actual evm script. Thus the lib directory was wrong and 'require' failed.
__FILE__
This commit uses __dir__ instead to resolve all possible symlinks. See this Stackoverflow answer for more information: https://stackoverflow.com/a/29494540/963029.
__dir__
===========
Full disclosure: Up until now, I have never touched ruby. Thus, if this doesn't make sense at all, that might be the reason ^^
Previously if evm was invoked through a symlink instead of directly,
__FILE__
pointed to the wrong file. It pointed to the symlink, not the actual evm script. Thus the lib directory was wrong and 'require' failed.This commit uses
__dir__
instead to resolve all possible symlinks. See this Stackoverflow answer for more information: https://stackoverflow.com/a/29494540/963029.===========
Full disclosure: Up until now, I have never touched ruby. Thus, if this doesn't make sense at all, that might be the reason ^^