lib/invoker/process_manager.rb in invoker-1.5.1 vs lib/invoker/process_manager.rb in invoker-1.5.3
- old
+ new
@@ -86,9 +86,14 @@
open_pipes[fd.fileno]
end
def load_env(directory = nil)
directory ||= ENV['PWD']
+
+ if !directory || directory.empty? || !Dir.exist?(directory)
+ return {}
+ end
+
default_env = File.join(directory, '.env')
local_env = File.join(directory, '.env.local')
env = {}
if File.exist?(default_env)