Normally File.expand_path(__dir__) or File.dirname(__FILE__) would return the current directory. But if I run that in my run.eye file, it returns . - any reason for that? - How would I get the current file's directory path in my eye script?
I also tried:
$current_path = Dir.pwd
Eye.config do
logger File.join($current_path, './log/eye.log')
end
But the $current_path gets set to /
Strangely, when running eye in the foreground with -f, the path gets expanded correctly.
Hi there,
Normally
File.expand_path(__dir__)
orFile.dirname(__FILE__)
would return the current directory. But if I run that in my run.eye file, it returns . - any reason for that? - How would I get the current file's directory path in my eye script?I also tried:
But the $current_path gets set to /
Strangely, when running eye in the foreground with -f, the path gets expanded correctly.